Git Glossary
This is a list of all the Git terms and commands explained in the Git Tutorial. Click a term to see what it means, with an example.
| Term | Description |
|---|---|
| Git | A free version control system that tracks changes in your files |
| Repository | A project folder with its full history, stored in a hidden .git folder |
| Working Directory | The files you see and edit in your project folder |
| Staging Area | Where you collect the changes that will go into the next commit |
| Commit | A saved snapshot of your staged changes, with a message |
| Commit Hash | The unique ID of a commit, often shortened to 7 characters |
| Commit Message | The short text that says what a commit changed and why |
| HEAD | A pointer to the commit you are on, usually through a branch |
| Detached HEAD | HEAD points to a commit instead of a branch |
| Branch | A separate line of work, so you can change things without touching main |
| Main Branch | The default branch of a repository, usually called main |
| git checkout | Move to another branch or commit, or create a branch with -b |
| git switch | Move to another branch, or create one with -c |
| git merge | Join the changes from another branch into the current branch |
| Fast-forward | A merge where Git just moves the branch forward, with no merge commit |
| Merge Conflict | Two branches changed the same lines, so Git needs you to choose |
| git config | Set your name, email and other Git settings |
| git init | Turn a folder into a new Git repository |
| git status | Show which files are changed, staged or untracked |
| git add | Stage changes so they go into the next commit |
| git log | Show the commit history of the current branch |
| git diff | Show the exact lines that changed |
| .gitignore | A file that lists files and folders Git should not track |
| Tag | A fixed name for one commit, often used for releases like v1.0 |
| Remote | A named link to another copy of the repository, often on GitHub |
| origin | The default name Git gives the remote you cloned from |
| Upstream | The remote branch a local branch tracks, or the original repo of a fork |
| git clone | Copy a remote repository, with all its history, to your computer |
| Fork | Your own copy of someone else's repository on GitHub or another host |
| git fetch | Download new commits from a remote without changing your own branches |
| git pull | Fetch new commits from a remote and merge them into your branch |
| git push | Upload your local commits to a remote repository |
| Pull Request | A request on GitHub to review and merge your branch into another |
| git rebase | Move your commits so they start from the tip of another branch |
| git cherry-pick | Copy one commit from another branch onto your current branch |
| git stash | Put uncommitted changes aside and get a clean working directory |
| git reset | Move the current branch back to an earlier commit |
| git revert | Undo a commit by adding a new commit with the opposite change |
| git restore | Throw away changes in a file, or unstage it |
| Amend | Change the last commit: fix its message or add forgotten files |
| git reflog | A log of every place HEAD has been, used to find lost commits |
| git blame | Show who last changed each line of a file, and in which commit |
| git bisect | Find the commit that introduced a bug with a binary search |
| git clean | Delete untracked files from the working directory |
| git worktree | Check out another branch in a second folder of the same repository |
| Submodule | A Git repository placed inside another repository at a fixed commit |
| Git LFS | An extension that stores large files outside the normal Git history |
| .gitattributes | A file that sets how Git handles line endings, diffs and merges per path |
| Commit Signing | Sign commits and tags with a GPG or SSH key to prove who made them |
| SSH Key | A key pair that lets you connect to GitHub without typing a password |
| Squash | Combine several commits into one commit |