Professional Documents
Culture Documents
Git Cheat Sheet: Create A Repository Work With Change Sync With 'Origin' (Github)
Git Cheat Sheet: Create A Repository Work With Change Sync With 'Origin' (Github)
Clone a repo (from GitHub, BitBucket) Stage all files Fetch & Merge latest changes from 'origin'
$ gi t c l one <r epo ur l > $ gi t add . $ gi t pul l
Inspect Repository Commit all staged files to local repo Push local changes to 'origin'
List uncommitted new/modified files $ gi t c ommi t - m ' mes s age' $ gi t pus h
$ gi t s t at us
Add and Commit all tracked files
Show unstaged changes $ gi t c ommi t - am ' mes s age'
$ gi t di f f
Unstage files, but keep changes
Show full change history $ gi t r es et <f i l e>
$ gi t l og $ gi t c hec k out <f i l e>
reset fetch
checkout <file>
reset <commit>
pull