Git comes with a lot of terminology. Some concepts sound similar but do very different things.
This cheat sheet covers the Git terms that matter most in everyday work โ with simple explanations and practical SmartGit context.
This is my personal Git cheat sheet ;) And yes, I actually printed it. You read that correctly: printed it! It lives in my notebook now, so whenever Git terminology gets confusing, I can simply have a quick look. Old-school? Maybe. Useful? Definitely. ๐
Repository
A repository (repo) is the project Git keeps track of.
It contains your files as well as the Git history behind them: commits, branches, tags, and other Git data.
Think of it as: your project + its entire version history.
Commit
A commit is a saved snapshot of your changes.
Each commit has its own unique ID (hash), author, timestamp, and commit message.
A -- B -- C
โ
latest commit
A good commit should represent one logical change.
Remember: A commit is not automatically uploaded to the server. It exists locally until you push it. And a short recommendation: don’t forget to Pull also ;) especially on Mondays โ maybe your team mates were busy and changed something.
Branch
A branch is an independent line of development.
Typical branch names might be:
main
develop
feature/blog-page
fix/navigation
Creating a branch lets you work on something without immediately changing main.
A -- B -- C main
\
D -- E feature/blog-page
SmartGit tip: Before creating a branch, check which commit or branch you are currently on. Your new branch starts from exactly that point. And don’t forget the easy way (my personal favorit one): Feature Flow.
HEAD
HEAD tells Git where you currently are.
Usually, HEAD points to the branch you have checked out.
main
โ
A -- B -- C
โ
HEAD
This becomes particularly important when rebasing.
If SmartGit says:
Rebase HEAD to main
it essentially means:
Take the branch I’m currently on and rebase it onto main.
Remember: If a Rebase option seems unavailable or wrong, first check which branch is currently checked out.
Checkout
Checkout means switching to another branch or commit.
For example:
Checkout feature/blog-page
makes feature/blog-page your active branch.
In SmartGit, the checked-out branch is also the branch your next commits will normally belong to.