What's the ".git/gitdir" file?
- From
Kyle Meyer <kyle@kyleam.com>
- Date
- Oct 27, 2015, 22:04 UTC
- Message-ID
- <87a8r4ary9.fsf@kyleam.com>
Hello,
When a ".git" file points to another repo, a ".git/gitdir" file is created in that repo.
For example, running
$ mkdir repo-a repo-b
$ cd repo-a
$ git init
$ cd ../repo-b
$ echo "gitdir: ../repo-a/.git" > .git
$ git statusresults in a file "repo-a/.git/gitdir" that contains
$ cat repo-a/.git/gitdir
.gitI don't see this file mentioned in the gitrepository-layout manpage, and my searches haven't turned up any information on it. What's the purpose of ".git/gitdir"? Are there cases where it will contain something other than ".git"?
Thanks.
-- Kyle git version 2.6.1