The .git repository

About

The .git directory is the git repository directory which is where almost everything that Git stores and manipulates is located.

GIT_DIR is an environment variable that you may set to locate it.

More information on the dedicated page: What is the Git Repository (Directory) ?





Discover More
Git - Current / working / HEAD / active branch

The current or active branch is: the branch checked out actually in the working tree The current branch is also known as the HEAD branch (in uppercase) that represents the last commit known...
Git - Fetch (Remote Repository Sync)

A fetch will sync information locally from a remote repository. It will receive missing objects from another repository. It will mostly git fetch: download new remote branch download all commits...
Git - Git (executable|command line)

The git executable where: --git-dir is the location of the repository files --work-tree is the location of the work tree Command Description add Add file contents to the index add--interactive...
Git - Head (Head Branch | Branch Head) / Last commit

The head is the last commit of a branch. while the HEAD (in uppercase) is the head of the current branch (active branch). headHEADcurrent branch page In the example below, the branch head of: ...
Git - Submodule (modules)

Submodules allow you to keep a Git repository as a subdirectory of another Git repository. package manager A submodule is materialzied as: a subdirectory in your working directory. with its metadata...
Git - gitignore

How to tell git to ignore files or directory with ignore patterns. Option Commited Scope Yes Only a specific Repository No Only a specific Repository No All repository on the system ...
What are Git Hooks?

hooks is an extension system of Git to execute executable file implemented by external party (ie not Git) that run at specified steps of a command. There are two groups: Client-Side Hooks: Scripts...
What is a Git Reference (Refs)

A ref (or reference) is a human-readable name given to a commit SHA-1 hash. When referring to a Git commit, you can refer it by name with a reference A Git reference can be rewritten to point to a new...
What is the Git Repository (Directory) ?

This page is the notion of repository and how it's implemented in Git. The git repository is a subdirectory named .git called also GIT_DIR that contains all repository files. It contains : commit...
What is the Git Staging area (or index)? The Proposed next commit

The staging area is a tree file called index that stores information to create the next commit. The index is like a pre-commit. The index holds a snapshot of the content of the working tree. You must...



Share this page:
Follow us:
Task Runner