Omit --global
to apply to the current project only.
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.editor emacs
git config --global credential.helper 'cache --timeout=60'
git pull <URL>
git push <URL> master
git add -A && git commit --author="NAME <EMAIL>"
git checkout <commit hash>
git checkout master
Edit .gitignore
with file patterns to ignore (a good .gitignore).
git config --global core.excludesfile ~/.gitignore_global
git rm --cached <FILENAME>
git reset --soft HEAD~1
git reset --hard HEAD~1
git revert HEAD
git log
git reset --hard <sha1-commit-id>
git apply --stat <patch>
git apply --check <patch>
git am --signoff < <patch>