Question

Smartgit creates .git directory in work-tree directory. I want to locate .git directory out of my work-tree directory, how to do it?

Was it helpful?

Solution

After creating or cloning your repository, you can move the .git-directory structure to somewhere else and instead add a .git-file which points to that location. E.g. if you have git-test-wt and git-test-repo stored side-by-side on your disk, create git-test-wt/.git-file with following content:

gitdir: ../git-test-repo
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top