Updated: 16 June 2024
Initialize a repo with no working directory e.g. a shared repository. Developers can clone shared-project.git
git init --bare shared-project.git
Use a bare git repo to control a working-tree in another directory
git --work-tree=path/to/my-code --git-dir=path/to/bare-repo.git <usual git commands>