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: Git - Repository (Directory)

Subdirectories

Subdirectory Entity
objects the database objects (commit, file, directory)
refs the refs (named hash)
hooks the hooks 1)
info configuration





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 mostly git fetch: download new remote branch download all commits added since the last fetch to the actual branch ( The head...
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)

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 ...
Git - 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...
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 that contains all repository files. It contains : commit log configuration,...
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