CSE326: Web Application Development
Lab 0: Git & MAMP


Scott Uk-Jin Lee

Except where otherwise noted, the contents of this document are Copyright 2017 Scott Uk-Jin Lee and Ahn YounGeun. All rights reserved.
Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the author's expressed written permission.

Valid HTML5 Valid CSS

Git

What is VCS(Version Control System)?

Git

What is Git?

git logo

Git

What is GitHub?

github

Git

Create GitHub Remote Repository

create repo for newbie

create repo for oldbie

Git

Create GitHub Remote Repository

create repo

Git

Create GitHub Remote Repository

created repo

Git

Git Initial Setting

Steps

  1. Initialize Git Workspace: git init
  2. User login:
    • git config user.name "Your Name"
    • git config user.email yourGitEmail@abcde.def (No double quotes!)
  3. Naming your GitHub Remote Repository: git remote add origin https://github.com/...

Git

Git Basic Workflow

git

Steps

  1. Pull your remote repository to Local Repository and Workspace
  2. Coding, Coding, Coding ... in your Workspace
  3. Add your changes to Index
  4. Commit(Save) your changes to Local Repository
  5. Pull your remote repository again
    • Conflict could be occured when remote repository modified before push
  6. Upload your works in Local Repository to Remote Repository

Git

Git Basic Workflow

git

Steps(Commands)

  1. git pull origin master
  2. Coding, Coding, Coding ... in your Workspace
  3. git add *
  4. git commit -m "Describe what changes are happend..."
  5. git pull origin master
  6. git push origin master

MAMP

What is MAMP?

git

Lab 0. Git & MAMP

Exercise 1: Setup Git & Create GitHub Repository

  1. Download Git and install it.
    • Don't change any settings when you install Git.
  2. Create new GitHub Repository.
  3. Open Terminal.
    • Windows: Win+R -> cmd
    • Mac: Open Spotlight -> Search '터미널' or 'Terminal'
  4. Follow the Git Basic Workflow(slide 7-8).
    • Initialize ~ Pull -> Create some file(anything is okay) -> Add ~ Push
    • Type the commands in Terminal or Git Bash.
  5. Show your GitHub repository to TA.

Lab 0. Git & MAMP

Exercise 2.1: Setup MAMP Environment(Apache)

  1. Download MAMP and install it.
    • Don't install MAMP PRO.
  2. Execute MAMP and click Start Servers.
    • If you got error, restart MAMP, start server and stop server(for terminate services).
    • And start server again.
  3. Open your Internet browser(IE, Chrome, Firefox, ...).
  4. Type localhost or 127.0.0.1 in address.
  5. Show your Internet Browser to TA.

Lab 0. Git & MAMP

Exercise 2.2: Setup MAMP Environment(MySQL)

After Exercise 2.1...

  1. Type command Terminal: mysql -uroot -proot
  2. Show your terminal to TA.