git memory knots

git commands extremely short cheat sheet

git clone https://path/to/repo/
 
git config --global user.name "First Last"
git config --global user.email name@ex.co
 
git init
 
git add .
git status
git reset HEAD -- path/to/file
git commit -a -m "comment"
 
git log --oneline
git show
git diff
 
git config --global credential.helper store
git config --global --unset credentials.helper
~/.git-credentials
 
git remote -v
git remote add origin https://path/to/repo
git push origin master
git pull
 
git branch
git checkout
git merge

© 2021, Alexander Krassotkin, cheat-sheets.org.