Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING BASH RUST

Git Glossary


Git Glossary

This glossary covers common Git terms and concepts. Use it as a handy reference while learning and working with Git.

Summary of Git Terms


Branch

A branch is a parallel version of your repository. Used to develop features independently.

Learn more on our Git Branch page

Example

git branch feature/login

Checkout

Switch to a different branch or commit.

Learn more on our Git Checkout page

Example

git checkout main


Clone

Create a local copy of a remote repository.

Learn more on our Git Clone page

Example

git clone https://github.com/user/repo.git

Commit

A snapshot of your changes in the repository.

Learn more on our Git Commit page

Example

git commit -m "Add login feature"

Conflict

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

Fetch

Download changes from a remote repository without merging.

Learn more on our Git Pull from Remote page

Example

git fetch origin

Fork

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

Index (Staging Area)

The Index (also called the Staging Area) is where changes are prepared before committing.

Learn more on our Git Staging Area page

Example

git add file.txt

Merge

Combine changes from different branches.

Learn more on our Git Merge page

Example

git merge feature/login

Origin

The default name for your main remote repository. You can rename or have multiple remotes if needed.

Learn more on our Git Remote page

Example

git remote add origin https://github.com/user/repo.git

Pull

Fetch and merge changes from a remote repository.

Learn more on our Git Pull from Remote page

Example

git pull origin main

Push

Upload your commits to a remote repository.

Learn more on our Git Push to Remote page

Example

git push origin main

Rebase

Move or combine a sequence of commits to a new base commit.

Learn more on our Git Rebase page

Example

git rebase main

Remote

A version of your repository hosted on the internet or network.

Learn more on our Git Set Remote page

Example

git remote -v

Repository (Repo)

The database where your project's history is stored.

Learn more on our Git Get Started page

Example

git init

Stash

Temporarily save changes that aren't ready to commit.

Learn more on our Git Stash page

Example

git stash

Tag

Mark a specific commit as important, usually for releases.

Learn more on our Git Tag page

Example

git 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.

Example

git log --oneline
# The top entry is HEAD

Upstream

An "upstream" branch is the default branch that your branch tracks and pulls from, usually on a remote repository.

Example

git push --set-upstream origin main


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

OSZAR »