Glossary, Alphabetically Sorted

Return to the Introduction (Click here to go to one level up)

Table of Contents

Annotated Tag
Attached HEAD
Bare Repository
Branch
Branch Reference
Cache
Commit
Commit History
Commit Object
Detached HEAD
External Branch
External Repository
Git Object
head
HEAD
Index
Lightweight Tag
Local Branch
Local Reference
Local Repository
Local Tracking Branch ::: Unofficial Term :::
Non-tracking Local Branch ::: Unofficial Term :::
Ref
Reference
Refspec
Remote
Remote Branch
Remote Name
Remote Reference
Remote Repository
Remote-Tracking Branch
Remote Tracking Branch ::: Unofficial Term :::
Remote-Tracking Reference
Repo
Repository
SCM
Shortname
Staged Files
Staging
Staging Area
Staging Index
Symbolic Reference
Symref
Tag
Three Trees
Tracked File
Tracked Repository
Tracking
Tracking Branch
Tree Object
Untracked File
Upstream
Upstream Branch
Upstream Repository
Working Directory
Working Tree



Annotated Tag
Definition:
A tag saved as a Git Object
Related Terms:
Notes:
Details about annotated tags can be found in the details about tags.
Attached HEAD
Definition:
HEAD (as a symbolic reference) that points to a reference in the commit history; Most of the time, HEAD points to a branch reference.
Related Terms:
Bare Repository
Definition:

A local repository which has only a commit history, but not a working tree nor a staging area

Related Terms:
Notes:

A bare repository is typically setup and used by a Git server in a server-client setup of Git.

The Git directory normally contains the working tree user files and the .git directory, but in a bare repository, it contains neither. Instead, the Git directory contains all the files normally contained in the .git directory and no user files. In this kind of setup, user files are committed by clients using git push instead of git commit.

A bare respository can be setup using the git init --bare command.

Beyond this basic description, a bare repository is beyond the scope of this document.

The term "bare repository" is an official Git term and the concept is described in more detail in Git Pro, Chapter 4.1.

Branch
Definition, Formal:
  1. A reference that points to a commit object
  2. The entire chain of commit objects (where each commit object is linked to at least one another commit object as if in a chain)
Definition, Informal:
Synonym Note:

A "branch" defined as a "reference that points to a commit object" is also known as head. (The other definitions of "branch" are not synonyms to "head".)

The term branch reference is refers to only one definition of "branch"

A "branch" is never a synonym to HEAD. ("head" and "HEAD" are two different terms.)

Related Terms:
More Details
Branch Reference
Definitions:
Related Terms:
Synonym Clarifications:
Reference Information:
"Branch reference" is an official Git term and is defined in Pro Git, Chapter 7.1.
Cache
Definition:
Synonym for staging index; Do not use
Related Terms:
Notes:
The term "cache" is supposedly obsolete, but pops up in the documentation with alarming frequency.
Synonym Problem
Synonyms should not be used in technical documentation. I completely disagree with any usage of this term. (Some commands still require its use, though.) See Too Many Unclear Terms for a detailed explanation.
Commit
Definition (Verb):
The action that "commits" the files from the staging area into the local repository.
Definition (Noun, Formal):
An object that contains information about the Git user who submitted the commit, the commit message submitted by the Git user, indexes to a set of Git user files (the user files are saved in a special part of Git called tree objects), and contains indexes to parents of the commit object
Definition (Noun, Informal):
The formally defined commit object and / or all the user files that the commit object points to
Related Terms:
More Details
Commit History
Definition:
All of the commit objects of a given repository; This represents the entire history of the project
Related Terms:
Notes:
Three Trees:

The Commit History is considered to be one of the three trees.

Commit Object
Definition:
The formal, noun definition of commit
Related Terms:
Synonym Clarification:
"Commit object" is an alternative name for the formal, noun definition of "commit". "Commit object" is not a synonym of "commit", but rather a clarification to which definition of "commit" is being referred to. With "commit object", we're speaking about the object part of commit, not the commit action nor the committed user files to which the commit object has indexed.
Reference:

"Commit object" is an official Git term and is defined in official Git Glossary and Pro Git, Chapter 10.2.

Git objects / Commit objects go by several names in Git documentation. In the glossary, it can be found under hash, object, and SHA-1. In Pro Git, the terms "commit object", "commit hash" and "SHA-1 Hash" are used. As stated in Too Many Unclear Terms, use of synonyms is strongly discouraged in technical documentation -- and as we see here, the terms "Git Object", "Commit Object", and "Commit hash" are confused by official Git documentation, although there is a difference between these three terms.

Detached HEAD
Definition:
HEAD (as a reference) that points to a Git object
Related Terms:
Note:

When determining whether a HEAD is detached or not, it's irrelevant whether a branch reference points to the same commit object as the HEAD. (In other words, it's possible for a "detached HEAD" and a "branch reference" to point to the same "commit object".) What makes a HEAD attached or detached is whether HEAD points to a reference or to a Git object.

Warning:

Be careful with detached HEADs! When new commits are committed to the commit history under the detached HEAD, the new commits can be lost if no branches point to the commit object and HEAD is directed to point somewhere else (like a different branch or another commit). There is no good way to later go back to these new commits. Eventually, the garbage collection will destroy the unreferenced commits.

Detached HEADs are safe for viewing "commit objects" in the "commit history", but dangerous for development.

More Notes:

It's possible to turn a detached HEAD into an attached HEAD by creating a branch.

External Branch
Definition:
A branch that exist on an external repository; Do not confuse this with remote branch.
Related Terms:
Note:
This is a term I made up. If the term "remote branch" exists, then an "external branch" must also exist.
External Repository
Definition:
Every repository in the world that is not the given local repository
Special Note:
Do not confuse this with remote repository
Related Terms:
More Details
Git Object
Definition:
An object based around Git's requirements
Related Terms:
Notes:

Git Objects are similar to (but not exactly like) objects found in common programming langauges like Java or C#. The specifics aren't important for casual users, but if you're curious, you can find the information in Pro Git, Chapter 10.2. According to Pro Git, Chapter 10.3, there are four major types of Git objects: tree objects and commit objects, tags, and blobs. Blobs are not relevant to the casual Git user and are therefore not discussed on this website. Tree objects form the underlying structure of certain parts of Git and sometimes are used to organize and store user files within Git. For this reason, commit objects use tree objects to store user files. Tags sometimes (but not always) do something similar.

Reference:

Git objects / Commit objects go by several names in Git documentation. In the glossary, it can be found under hash, object, and SHA-1. In Pro Git, the terms "commit object", "commit hash" and "SHA-1 Hash" are used. As stated in Too Many Unclear Terms, use of synonyms is strongly discouraged in technical documentation -- and as we see here, the terms "Git Object", "Commit Object", and "Commit hash" are confused by official Git documentation, although there is a difference between these three terms.

head
Definition:
Related Terms:
Notes:
HEAD
Special Notes:
Definition (Overly Simplified Definition):
The current branch; The current head
Definition (One Definition Version):
A reference that points to a Git object or another "reference" in the commit history
Definitions (Two Definition Version):

There are two types of HEADs:

  1. Attached HEAD -- A symbolic reference that points to a reference in the commit history; Most of the time, HEAD points to a branch reference.
  2. Detached HEAD -- A reference that points to a Git object
Related Terms:
More Details
Index
Definition (Official but Incorrect)
Synonym for staging index
My Definition (Best Definition)
A list of one or more entries; Each entry points to (or links to) another entry, another index, a file, a (Git) object, or a variety of other things
Related Terms:
More Details
Lightweight Tag
Definition:
A tag saved as a reference
Related Terms:
Notes:
Details about lightweight tags can be found in the details about tags.
Local Branch
Definition:
A branch that exist in a local repository.
Related Terms:
Local Reference
Definition:
A reference stored on the local repository
Related Terms
Notes
References are sometimes simultaneously a "local reference" and a remote reference. No, it doesn't make sense to me either, but it's one of the oddities I ran across. Click on "More Details" below for more information.
More Details
Local Repository
Definition:
The repository in which the Git user happens to be working in at the moment
Related Terms:

More Details
Local Tracking Branch ::: Unofficial Term :::
Unofficial Term:
Do Not Use; This term is found on the internet, but does not exist in official Git documentation
Related Terms:
Notes:

Having a "local tracking branch" implies having a "remote tracking branch", but the term remote-tracking branch already exists and the two terms could easily be confused.

Relative to a given repository, the terms tracking branch and remote-tracking branch are always stored on a local repository.

Non-tracking Local Branch ::: Unofficial Term :::
Unofficial Term:
Do Not Use; This term is found on the internet, but does not exist in official Git documentation
Related Terms:
Notes:

A tracking branch is always a local branch, but a local branch is not necessarily a tracking branch. On the surface, it seems logical that the term non-tracking local branch should exist, but the term "tracking" is actually undefined by Git and undefined by Git documentation. Strangely, even though the term is undefined, the term "tracking" is in heavy use. Because of this, the term "tracking branch" is on very shaky ground. Without a firm, official definition of what a "tracking branch" is, we shouldn't use the term "non-tracking local branch". For detailed information, see my dedicated section of What is Tracking?

Ref
Definition:
Synonym for reference; Do not use
Related Terms:
Notes:

As I described in Too Many Unclear Terms, synonyms are not acceptable. Unfortunately, the term "ref" (or the plural "refs") is used a lot in the official Git documentation and glossary.

Reference
Definition:
  1. A pointer to a Git object; The official Git documentation is unclear about whether a reference can point to another reference
  2. A string representing a location where the reference is found under .git
Related Terms:

How Other Terms Relate to the Term "Reference"

Whether a term qualifies as a reference or not can be very confusing. (For instance, "HEAD" may or may not be a reference, but "detached HEAD" is definitively a reference. A tag is sometimes a reference and sometimes not.) Under "More Details", I provide a list of terms, whether they classify as references, and why.

More Details
Refspec
Definition:

A mapping between references in a remote repository (known as the "source") and references in a local repository (known as the "destination"); refspecs can be used in Git commands like git pull or git push; refspecs are stored in .git/config

Related Terms:
More Details
Remote
Special Note:
The term "remote" is the most misunderstood, misused, ill-defined and mis-defined term of Git. Even the Git documentation seems to get it wrong more often than not. See Demystifying Remotes for a very detailed explanation.
Non-Definition:
Official Git definitions for "Remote":
Official Git documentation uses the term "remote" as a synonym for:

Official Git documentation also uses the term "remote" like the regular English term "remote", but this is also used incorrectly. Again, this explained in Demystifying Remotes.

Note About "git remote":

I've seen more than one unofficial website say git remote adds and removes "remote references". As explained in Demystifying Remotes, it does not.

In the official documentation, I spotted one place in Pro Git where it might be utilized like this, but I believe it to merely be either an unclear statement or an error. This anomaly can be found in Chapter 3.5 with the quote "You can add it as a new remote reference to the project you’re currently working on by running the git remote add command...". Looking at the quote just as I copied here, it looks like this is an error, but in full context of the chapter, I think they are trying to say that a side effect of running git remote creates a remote reference -- and this is correct. The primary function of git remote is to create or remove remote names, but part of that process also includes creating or removing remote references in the local repository. (The other possibility is that the author meant to use the term "remote repository" instead of "remote reference".)

Other commands have similar side effects on remote references. git clone creates remote references as a side effect. Remote references are also added, remoted, or altered by the git commands git fetch, git push, and git pull. Other commands like git branch can also have a direct influence over the remote references.

So, no, git remote does not add and remove "remote references".

If You're Writing Documentation About Git:
If you're writing documentation, don't ever use the term "remote". Instead, look at the five alternative terms I presented and use the correct one.
The Word "Remote" Doesn't Always Mean "Remote":
Don't assume that the word "remote" modifies other words with the English definition of "far removed in space or time". For instance:
Remote Branch
Definition:
A branch that exists on a remote repository
Special Notes:
Related Terms:
More Details
Remote Name
Important Note
This is not an official Git term. Because the Git term remote has five different meanings, the term "remote name" was created by me to reduce the confusion. Click on "More Details" below for more basic information. See Demystifying Remotes for a very detailed explanation.
Definition:
A link in the local repository between a shortname and a URL of an external repository; The existence of a remote name means that the local repository considers the external repository to be a remote repository
Related Terms:
More Details
Remote Reference
Special Note:

There are two official definitions, and both definitions are widely used on the internet. It's confusing, but unfortunately, I don't see a way to fix this problem, so I have left both defined here.

Definitions, Official:

  1. a reference in an external repository which points to a Git object on that same external repository; the local repository merely observes the reference
  2. a reference in a local repository which points to a Git object on an external repository; the local repository actively stores the reference

Related Terms:
More Details
Remote Repository
Definition:
An external repository that is specially marked and defined by the local repository with a remote name; A remote repository is always in relation to a given local repository.
Related Terms:
More Details
Remote-Tracking Branch
Definition:
An "uneditable" copy of a remote branch that exists on the local repository; Remote-tracking branches are often used with a tracking branch
Related Terms:
More Details
Remote Tracking Branch ::: Unofficial Term :::
Unofficial Term:
Do Not Use; This term is found on the internet, but does not exist in official Git documentation
Related Terms:
Remote-Tracking Branch
Notes:
This is just a misspelling of Remote-Tracking Branch
Remote-Tracking Reference
Definition:
Do not use; This is an incorrect term used in official Git documentation which makes no sense
Notes:

The use of this term in the official Git documentation must be incorrect.

The man pages of git fetch and git pull use the term "remote-tracking reference" in their pruning sections. However, by definition of what a reference is, orphaned Git references cannot exist. Instead, pruning refers to the process of cleaning up orphaned Git objects. (You can see that in the man pages of git prune. Atlassian also has a good article about the command.)

The term "remote-tracking ref" can be found in the man pages of git push. (If there are other uses of this term in official Git documentation, I'm unaware of it.) The information in these man pages of "git push" is beyond my understanding, but for the same reasons I gave above, it should not exist here either.

Repo
Definition:
Synonym for repository
Related Terms:
Synonym Problem
"Repo" is an official term used in the Git documentation, but synonyms should not be used in technical documentation. See Too Many Unclear Terms for a detailed explanation.
Repository
Definition:
A place defined by Git where user files and changes to those files are stored; The three types of repositories are local repository, remote repository, and external repository.
Note About "Tracked Repository"
Despite what many people think, the term "tracked repository" does not actually exist. See the detailed tracked repository glossary term for an explanation.
Related Terms:
SCM
Definition:
Source Code Management
Notes:
The term "SCM" is prominent in the official Git website https://git-scm.com and I wondered what it meant. I figured I wasn't the only one to wonder, so I included it in my glossary.
Shortname
Definition:
A name given by the Git user to represent a URL where an external repository resides
Related Terms:
More Details
Staged Files
Definition:
Files pointed to by a given staging index; Files existing in the staging area
Related Terms:
Example:
Often used in a phrase like "the staged files were committed"
Staging
Definition:
The act of adding a change to the staging area; User files may or may not be copied from the working tree to the staging area; User files may or may not be deleted from the staging area
Related Terms:
More Details
Staging Area
Definition (Official but Incorrect):
Synonym for staging index
Definition (Official but Correct, Formal):
The staging index and a collection of staged files; Staged files can later be committed to the local repository
Definition, Informal
A "proposal" for the next commit
Related Terms:
Ambiguous Official Definition
The official Git documentation winds up presenting multiple official definitions. This ambiguity (and incorrectness) is not acceptable to me. See Too Many Unclear Terms for a detailed explanation.
Synonym Problem
Synonyms should not be used in technical documentation. Official Git documentation has multiple synonyms for the term "staging area" which is a really bad idea. See Too Many Unclear Terms for a detailed explanation.
Three Trees:
The staging area is considered to be one of the three trees.
Staging Index
Definition, Formal:
An index of pointers which point to collection of staged files (stored in the staging area) that will probably later be committed to the local repository; The staging index is part of the staging area
Definition, Informal:
A "proposal" for the next commit.
Related Terms:
Staging Index and Staging Area Are Two Separate Entities:
Even though it goes against the official (and unclear and self-contradicting) Git documentation, I have defined the term staging area and staging index to be different from one another. In my definition, a staging area includes staged files, but a staging index does not.
Synonym Problem
Synonyms should not be used in technical documentation. Official Git documentation has multiple synonyms for the term "staging index" which is a really bad idea. See Too Many Unclear Terms for a detailed explanation.
Three Trees:
The staging index is officially considered to be one of the three trees, although I disagree with this notion. Instead, I think only the staging area should be considered part of the three trees.
Symbolic Reference
Definition:
A reference that points to another reference; A pointer that points to a reference
Related Terms:
Notes:
There is confusion as to whether a "symbolic reference" is a completely separate entity from "reference", or if "symbolic reference" is a type of "reference". See the detailed entry of reference for more information.
Symref
Definition:
Synonym for symbolic reference; Do not use
Related Terms:
Notes:
As I described in Too Many Unclear Terms, synonyms are not acceptable. Unfortunately, the term "symref" (or the plural "symrefs") is used a lot in the official Git documentation and glossary.
Tag
Definition:

A user defined "label" which marks something in Git is important; Typically this is used to mark commit objects and name the releases of a program (like "v1.0", "v2.0.3", etc)

Types of Tags:

  1. Annotated Tag -- Tag saved as a Git object
  2. Lightweight Tag -- Tag saved as a reference

Related Terms:

More Details
Three Trees
Definition:
The three main collections of files that a Git user works with. The three collections are:
Related Terms:

More Details
Tracked File
Definition:
A user file that exist in the working tree and is
Related Terms:
Notes:

"Tracked Files" and untracked files have nothing to do with tracking, tracking branches, tracked repositories, or remote-tracking branches.

"Tracked files" and "untracked files" are very poorly defined by Git documentation and the information is contradictory. This means there is a chance that my definition is incorrect. You can read the details in What is "Tracking"?

Tracked Repository
Definition (Official):
A term that doesn't really exist in Git documentation, but is alluded to enough in the Git documentation to cause confusion; Don't use it
Definition (Unofficial):
Synonym for Remote Repository
Related Terms:
Note:
Many people erroneously believe the term "tracked repository" exist. (It is used exactly one time in the Git documentation.) Click on the button "More Details" below for an explanation of why this is incorrect.
More Details
Tracking
Definition (Official, Incorrect, and Partly Made Up):
My Definition (Unofficial but More Accurate):

The existence of an unnamed link between a local branch and a remote branch; this unnamed link provides shortcuts to the user while typing in some Git commands like git fetch, git pull, or git push

Note: Although it is more difficult, "tracking" is not required to fetch, pull, or push

Related Terms:
Notes:

I made up an official definition based on official information, because there is no official definition for "tracking" that I know of.

My unofficial definition is more accurate than the official definition I wrote, but the unofficial definition is still confusing, incomplete, inaccurate, and ultimately only marginally better than the official definition.

If the unofficial definition didn't make sense, a full understanding of "tracking" and its supporting terminology can be achieved by reading my article What is "Tracking"? Unfortunately, because the term "tracking" is used in such a poor way, I have to take the reader through a round-about trek in order to understand what "tracking" is and what its supporting terms actually mean.

In my opinion, the term "tracking" is defined so badly that it should never be used at all. Unfortunately, Git commands and Git documentation use the terms "tracking" or "tracked" frequently, so it will stay around for a long time.

Tracking Branch
Definition:
A given local branch is designated as a "tracking branch" when an unnamed link exists linking the given local branch and the given remote branch; the unnamed link allows the user to optionally use command shortcuts to synchronize user files, synchronize commits, and identify conflicts between the given local branch and the given remote branch (i.e., using abbreviated forms of git fetch and git push); "Tracking branch" and "upstream branch" are counterparts
Related Terms:
Notes:
I do not condone the use of the terms "tracking branch" and "upstream branch". Unfortunately, because there is no other terms to describe these phenomenons, I reluctantly continue to use them.
More Details
Tree Object
Definition:
A Git object with a tree-like structure used to store information; The exact information is not relevant to casual Git users
Related Terms:
Note:
Tree objects form the underlying structure of certain parts of Git and are sometimes used to organize and store user files within Git. For this reason, commit objects use tree objects to store user files. Annotated tags also sometimes use tree objects to store files. The specifics of a tree object are not relevant to the casual Git user and are therefore not discussed much on this webite. If you're curious, you can read up on tree objects in Pro Git, Chapter 10.2.
Untracked File
Definition:
A user file that exist in the working tree, but not in the staging area and not in the commit history
Related Terms:
Notes:

Tracked Files and "untracked files" have nothing to do with tracking, tracking branches, tracked repositories, or remote-tracking branches.

"Tracked files" and "untracked files" are very poorly defined by Git documentation and the information is contradictory. This means there is a chance that my definition is incorrect. You can read the details in What is "Tracking"?

Upstream
Definition:
An approximate synonym for remote repository; Do not use
Related Terms
Notes:
Upstream Branch
Definition, Official:
A remote branch that is "tracked"
My Definition:
A given remote branch is designated as an "upstream branch" when an unnamed link exists linking the given local branch and the given "remote branch"; the unnamed link allows the user to optionally use command shortcuts to synchronize user files, synchronize commits, and identify conflicts between the given local branch and the given remote branch (i.e., using abbreviated forms of git fetch and git push); "Tracking branch" and "upstream branch" are counterparts
Related Terms:
Notes:
I do not condone the use of the terms "tracking branch" and "upstream branch". Unfortunately, because there is no other terms to describe these phenomenons, I reluctantly continue to use them.
More Details
Upstream Repository
Definition:
Synonym for remote repository; Do not use
Related Terms:
Notes:
Working Directory
Definition:
Synonym for working tree; Do not use
Related Terms:
Notes:
"Working Directory"" is not a good term to use because the collection of files that the Git user works on can be spread across multiple directories. Although I haven't seen any official deprecation of the use of the term "working directory", there was a code change in Git which acknowledges that this is not an optimal term to use.
Synonym Problem
Synonyms should not be used in technical documentation. See Too Many Unclear Terms for a detailed explanation.
Working Tree
Definition:
The collection of files and directories that are manipulated by the Git user at the operating system level and of which the local repository is aware
Related Terms:
Note:
The working tree does not include the staging area nor any commit history. The top most directory of the working tree should have the .git folder.
Three Trees:
The Working Tree is considered to be one of the three trees.
More Details