Git

Joel Ross

IMT 511

DO NOT PUT ONE REPO INSIDE OF ANOTHER!!

projectX

projectY

Repository

(or "repo")

projectX

projectY

Repository

(or "repo")

If you forget the -m option,
use :q! (colon then q then !) to quit vim

Local Process

files

staging area

git add .
git init
git commit -m "message"

repo

Git Commands

 git init

Create new repo in folder

 git status

Check status of repo

 git add FILENAME

Add file to staging area

 git commit -m "message"

Commit changes

 git log --oneline

View commit history

 git checkout COMMIT_HASH FILENAME

Restore previous version of a file

imt511-git

By Joel Ross

imt511-git

  • 553