Transcription of Git Cheat Sheet
{{id}} {{{paragraph}}}
Git Cheat SheetCreateFrom existing repoFrom existing datacd ~/projects/myprojectgit initgit add . git clone ~/existing/repo ~/new/repogit clone clone git command --helpGlobal Git configuration is stored in $HOME/.gitconfig (git config --help) Files changed in working directoryShowA specific file from a specific $IDChanges to tracked filesgit statusgit diff git show $id:$fileAll local branchesgit branchHistory of changesgit log Who changed what and when in a filegit blame $file What changed between $ID1 and $ID2git diff $id1 $id2 History of changes for file with diffsgit log -p $file $dir/ec/tory/A commit identified by $IDgit show $idRevertRevert the last commitgit revert HEAD Revert specific commitgit revert $id Checkout the $id version of a filegit checkout $id $file!
Git Cheat Sheet Create From existing repo From existing data cd ~/projects/myproject git init git add . git clone ~/existing/repo ~/new/repo git clone git://host.org/project.git
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}