Git Glossary provides essential version control capabilities for managing codebase changes cleanly, predictably, and efficiently.
This glossary covers common Git terms and concepts. Use it as a handy reference while learning and working with Git.
A branch is a parallel version of your repository. Used to develop features independently.
Learn more on our Git Branch page
Examplegit branch feature/login
Switch to a different branch or commit.
Learn more on our Git Checkout page
Examplegit checkout main
Create a local copy of a remote repository.
Learn more on our Git Clone page
Examplegit clone
A snapshot of your changes in the repository.
Learn more on our Git Commit page
Examplegit commit -m "Add login feature"
When Git can't automatically merge changes from different commits or branches. You must resolve the differences manually.
Learn more on our Git Branch Merge page
Example# Example: Merge conflict message
# CONFLICT (content): Merge conflict in file.txt
Download changes from a remote repository without merging.
Learn more on our Git Pull from Remote page
Examplegit fetch origin
A personal copy of someone else's repository, usually on a platform like GitHub.
Learn more on our Git Remote Fork page
Example# Use the GitHub interface to fork a repo
The Index (also called the Staging Area) is where changes are prepared before committing.
Learn more on our Git Staging Area page
Examplegit add file.txt
Combine changes from different branches.
Learn more on our Git Merge page
Examplegit merge feature/login
The default name for your main remote repository. You can rename or have multiple remotes if needed.
Learn more on our Git Remote page
Examplegit remote add origin
Fetch and merge changes from a remote repository.
Learn more on our Git Pull from Remote page
Examplegit pull origin main
Upload your commits to a remote repository.
Learn more on our Git Push to Remote page
Examplegit push origin main
Move or combine a sequence of commits to a new base commit.
Learn more on our Git Rebase page
Examplegit rebase main
A version of your repository hosted on the internet or network.
Learn more on our Git Set Remote page
Examplegit remote -v
The database where your project's history is stored.
Learn more on our Git Get Started page
Examplegit init
Temporarily save changes that aren't ready to commit.
Learn more on our Git Stash page
Examplegit stash
Mark a specific commit as important, usually for releases.
Learn more on our Git Tag page
Examplegit tag v1.0
Note: Refer to this glossary whenever you encounter an unfamiliar Git term!
HEAD is a reference to the current commit your working directory is based on. Usually points to the latest commit on your current branch.
Examplegit log --oneline
# The top entry is HEAD
An "upstream" branch is the default branch that your branch tracks and pulls from, usually on a remote repository.
Examplegit push --set-upstream origin main
Execute the following terminal commands to work with this concept in your workspace:
# Check repository status
git status
# View formatted log
git log --oneline -n 5
Fix CORS bug rather than Fixed CORS bug).git diff to review unstaged modifications before adding files to the index.git switch -c <branch-name> to preserve edits.git restore --staged <filename> to remove the file from the index without altering your local workspace copy.Open your terminal in a test project directory, execute git status, and verify your current working tree state. Practice running git log --oneline to review commit history.
Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.
Quick Access With