Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用我的点文件和其他一些我想在多台机器上同步的文件创建一个 repo。这些文件分布在多个目录中(不仅是~主目录)。
~
git可以跟踪几个目录中的文件,这些目录不一定.git/是存储在哪里的子目录?
.git/
我现在提出的最佳解决方案是制作一个脚本,将点文件复制到 git repo 已初始化的单个目录中。
人们通常做的是在某个地方有一个 git repo,~/.dotfiles然后使用从该目录到点文件应该所在的位置的符号链接。
~/.dotfiles
请参阅Github 上的 dotfiles 以获得更多灵感。