这是我当前的目录结构:
- mygit
- code
- .git
- morecode
- mycode
我想使用 git 来管理我的代码,但我不希望将其文件放在预期的 code/morecode/mycode/.git 中,而是放在代码文件夹之外,例如在我的 git 。
任何想法如何做到这一点?
最佳答案
此外,您可以简单地使 .git 成为常规文件并在其中放置路径,而不是使用符号链接(symbolic link):
$ echo gitdir:/path/to/gitdir > .git
关于git - 在自定义位置设置 .git 文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5337025/