GitLab Git Associate key terms
GitLab Git Associate · Get comfortable with the vocabulary.
- Repository
- Related: Commit, Working Tree
A directory tracked by Git that stores project files plus the complete history of every committed change, kept in a hidden .git folder at its root.
- Commit
- Related: SHA, HEAD
An immutable snapshot of the tracked files at one point in time, identified by a SHA hash and linked to its parent commit, forming the project history.
- SHA
- Related: Commit, Tag
The 40-character hexadecimal hash Git computes for each object; the first 7 to 12 characters usually identify a commit unambiguously in commands.
- Working Tree
- Related: Staging Area, Repository
The checked-out files on disk that you edit, which may differ from the last commit until you stage and commit changes.
- Staging Area
- Related: Working Tree, Commit
Also called the index; a holding area where selected changes are prepared with git add before being recorded in the next commit.
- Branch
- Related: HEAD, Merge
A movable pointer to a commit that lets you develop work in isolation; creating one is cheap and does not copy files.
- HEAD
- Related: Branch, Checkout
A reference pointing to the commit currently checked out, usually by pointing at the current branch; a detached HEAD points directly at a commit instead.
- Checkout
- Related: HEAD, Switch
The operation of switching the working tree to another branch or commit, updating files on disk to match the target.
- Merge
- Related: Fast-Forward, Merge Conflict
Combining the histories of two branches by creating a merge commit with two parents, or by fast-forwarding when no divergence exists.
- Fast-Forward
- Related: Merge, Rebase
A merge where the target branch simply moves forward to the source commit because no new commits exist on the target since divergence.
- Merge Conflict
- Related: Merge, Rebase
A state where two branches changed the same lines of a file, so Git cannot merge automatically and requires manual resolution before committing.
- Rebase
- Related: Merge, Force Push
Replaying a branch's commits onto a new base commit to produce a linear history, rewriting the commit hashes of the replayed commits.
- Remote
- Related: Origin, Fetch
A named reference to another copy of the repository, usually on a server such as GitLab, used for fetching and pushing commits.
- Origin
- Related: Remote, Clone
The default name Git gives to the remote from which a repository was cloned; it is a convention, not a reserved keyword.
- Clone
- Related: Remote, Origin
Copying a remote repository to your machine, including its history, and setting up a remote named origin with tracking branches.
- Fetch
- Related: Pull, Remote
Downloading new commits and refs from a remote into local remote-tracking branches without changing your working tree or current branch.
- Pull
- Related: Fetch, Merge
Fetching from a remote and then integrating the downloaded commits into the current branch, by merge by default or by rebase when configured.
- Push
- Related: Force Push, Remote
Uploading local commits to a remote branch so other collaborators can see them; rejected if the remote has commits you do not have.
- Force Push
- Related: Push, Rebase
Overwriting a remote branch with your local history using --force or --force-with-lease, which can discard others' commits and is risky on shared branches.
- Tracking Branch
- Related: Remote, Push
A local branch linked to a remote branch, so git pull and git push work without naming the remote and branch each time.
- Merge Request
- Related: Protected Branch, Code Review
GitLab's proposal to merge one branch into another, providing review, discussion threads, pipelines, and approval controls before the merge happens.
- Fork
- Related: Merge Request, Protected Branch
A server-side copy of a repository under another namespace, commonly used to contribute to projects where you lack push access to the source.
- Log
- Related: Commit, Diff
The command that lists commits reachable from a ref, showing hashes, authors, dates, and messages; options control format and graph layout.
- Diff
- Related: Log, Blame
A line-by-line comparison between two states of files or commits, showing added and removed lines with surrounding context.
- Blame
- Related: Log, Diff
Annotating each line of a file with the commit, author, and date that last changed it, useful for tracing the origin of a specific line.
- Tag
- Related: SHA, Commit
A named pointer to a commit used to mark releases; lightweight tags are just refs, while annotated tags store a message, tagger, and date.
- Revert
- Related: Reset, Commit
Creating a new commit that undoes the changes of an earlier commit, preserving history and safe to use on shared branches.
- Reset
- Related: Revert, HEAD
Moving the current branch pointer to another commit; soft keeps changes staged, mixed unstages them, and hard discards working tree changes.
- Stash
- Related: Working Tree, Staging Area
Temporarily saving uncommitted changes so the working tree becomes clean, allowing you to switch context and reapply the changes later.
- Cherry-Pick
- Related: Rebase, Commit
Applying the change introduced by a specific commit onto the current branch, creating a new commit with a different hash.
- Protected Branch
- Related: Merge Request, Code Review
A GitLab branch rule that restricts who can push or merge, often requiring merge requests, approvals, and passing pipelines before changes land.
- Code Review
- Related: Merge Request, Protected Branch
The practice of examining proposed changes in a merge request, leaving comments and approvals, to catch defects and share knowledge before merging.
- Feature Branch
- Related: Branch, Merge Request
A short-lived branch created from a shared base to develop one change or feature, then merged back through a merge request.
- Git Flow
- Related: Feature Branch, Trunk-Based Development
A branching model using long-lived main and develop branches plus feature, release, and hotfix branches, suited to scheduled releases.
- Trunk-Based Development
- Related: Feature Branch, Protected Branch
A strategy where developers integrate small changes into a single main branch frequently, using short-lived branches and feature flags to reduce merge risk.
- Squash
- Related: Merge Request, Rebase
Combining several commits into one before merging, producing a single tidy commit on the target branch while keeping the source history intact.
- .gitignore
- Related: Working Tree, Repository
A file listing patterns for paths Git should not track, such as build output, secrets, and dependency folders, keeping the repository clean.