Guide to Git — Common Git Terms Explained

This article explains the most common Git terms used in version control workflows. It covers essential concepts such as branches, commits, cloning, merging, remotes, HEAD, stashing, deployment, and more, helping beginners understand Git’s terminology and how each term fits into the development process.

Git TermsVersion ControlGit Guide

~4 min read • Updated Feb 21, 2026

1. Overview


Git is a version-control system that tracks and manages changes to files. Every time content changes, Git records it and stores the history. Because Git includes many advanced features, it uses terminology that may be unfamiliar to new users.


For examples of how these terms work in practice, refer to the Common Git Commands documentation.


2. Common Git Terms


Archive


An archive stores the contents of the current working tree (excluding the .git directory and uncommitted changes) in a .zip or .tar file. Archives are useful for creating downloadable source packages.


Branch


A branch represents a separate line of development. Each branch maintains its own history, working directory, and staging area. You can create unlimited branches, but you can only work in one at a time. Branches typically diverge from the main line of development and later merge back.


Check Out


Git uses “check out” in two contexts:


  • Switch branches or commits: git checkout moves HEAD to a different branch or commit.
  • Restore files: git checkout -- filename restores a file from a commit or index, discarding local changes.

Example:


git checkout test
git checkout -- example.js

Cherry-pick


Applies a specific commit from one branch onto another branch’s HEAD using git cherry-pick.


Clone


Cloning creates a local copy of a remote repository. When you run git clone, Git:


  • Creates a new local repository.
  • Sets the remote repository as origin.
  • Fetches all commits and branches.
  • Checks out the default branch (usually master or main).

To clone private repositories, additional authentication steps are required.


Commit


A commit represents a point in the project’s history. When you commit, Git saves the current state of the index and updates HEAD to the new commit.


Commit Object


A commit object contains:


  • The tree object (files)
  • Parent commits
  • Metadata (author, date)
  • A unique SHA‑1 identifier

Deployment


Deployment sends completed code to production. cPanel’s Git Version Control interface can automatically deploy changes when a repository receives updates.


Fetch


git fetch downloads new changes from the remote repository but does not merge them into your working branch.


Fork


A fork is a server-side copy of a repository. It allows experimentation without affecting the original project.


HEAD


HEAD is the SHA‑1 identifier of the most recent commit on the active branch. Checking out a commit instead of a branch puts Git into a “detached HEAD” state.


Head


Heads are the latest commits for each branch. A repository contains many heads but only one HEAD.


Hook


Hooks are scripts that run before or after Git actions. They are stored in the /hooks directory. cPanel automatically adds a post-receive hook to managed repositories.


Index (Staging Area)


The index stores files that will be included in the next commit. Git also uses it during merge operations.


Log


The log lists commit hashes and metadata. You can view it using git log or Gitweb in cPanel.


Master or Main


The default branch of most repositories. Git updates its HEAD with each new commit.


Merge


Merging adds commits from one branch into another. You can merge using:


  • git merge — merges commits into the current branch.
  • git push — sends merged commits to the remote repository.

Origin


origin is the default name for the remote repository from which you cloned. It is often referred to as “upstream”.


Pull


git pull fetches changes and then merges them into the current branch.


Push


git push sends local commits to the remote repository.


Rebase


git rebase reapplies commits on top of another base commit, rewriting history and removing merge commits.


Remote


A remote repository exists on another server. Git interacts with it when fetching, pulling, or pushing.


Repository


A repository stores all Git data for a project, including commits, branches, and the working tree.


SHA‑1


A 40‑character hash used to identify Git objects such as commits and stashes.


Stash


A stash stores uncommitted changes temporarily so you can return to a clean working state.


Version Control


Version control systems track file changes and allow collaboration. Git is one such system.


Working Tree


The working tree contains the checked-out files for the current branch, including local modifications.


Conclusion


Understanding these common Git terms helps developers navigate version control more effectively. Whether you are branching, merging, stashing, or deploying, these concepts form the foundation of Git-based workflows.


Written & researched by Dr. Shahin Siami