Pergunta

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

Foi útil?

Solução

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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top