gitfile
リポジトリ本体を作業ディレクトリとは別のディレクトリに置くやつ
作業ディレクトリには .git のファイル名でリポジトリのディレクトリのパスを書いておく
gitdir: /foo/bar/baz/.git
という感じの書いておく
gitfile (このページにgitfileの大した説明はない)
https://git-scm.com/docs/user-manual#Documentation/user-manual.txt-aiddefgitfileagitfile
Git Repository Layout (gitfileという語は無いが説明がある)
https://git-scm.com/docs/gitrepository-layout
リポジトリ作成時に引数で指定して始めから別ディレクトリに作れるらしい
git init --separate-git-dir=<git dir>
https://git-scm.com/docs/git-init#Documentation/git-init.txt---separate-git-dirltgitdirgt
リポジトリ取得時も出来るらしい
git clone --separate-git-dir=<git dir> <repository>
https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---separate-git-dirltgitdirgt