---------------------------------------------------- Phil's GIT command line cheat sheet, edit 3-29-2015 ---------------------------------------------------- *** Create a local repository git clone /data/projects/riverware/builds.git AlamPhilDev git clone /data/projects/riverware/builds-rt.git AlamRT git clone /data/projects/StudyMgr/StudyMgr.git StudyMgr *** General git fetch origin *** Checkout and track remote branch git checkout -b PhilDev origin/PhilDev git checkout -b TeacupDev origin/TeacupDev *** Show which branch I'm on. git branch *** Show changed files and stuff git status *** Switch to local branch git checkout TeacupDev *** Erase local changes git checkout *** Stash, pop, drop all changes. git stash git stash pop git stash drop *** Pull changes from remote (only after erasing or stashing local changes) git pull *** Diff local changes git diff --color git diff --name-only git diff --numstat git diff --stat *** Show files changed in last commit in branch git show --name-only --oneline HEAD ---