Here I collect useful git commands that I use very often. I don’t go into details. It’s just a convenient list to look up commands. Commits Add changes to previous commit: git commit –amend Undo last commit, but keep changes: git reset –soft HEAD~1 To avoid that changes of specific files get committed (e.g. for local configurations, etc.): git update-index –assume-unchanged .config/params.cnf Branches Checkout single file form another branch: git checkout otherBranch – file.