Do all files have to be in the 'repository folder' when using Mercurial?

只愿长相守 提交于 2019-12-11 03:56:53

问题


This is my first time using Mercurial so this may be a very newbie question...

If I create a repository, e.g. c:\HG1 do all my files need to be under that directory?

Or can i add files from a different folder e.g. 'C:\myotherfolder'?

If you can add from diff folder...how, can't seem to figure it out.

thanks.

p.s. I'm coming from a non-distributed source control system so perhaps I'm just thinking about my workflows with that mindset.


回答1:


Yes, all of the files to be tracked must be under the root repository folder.




回答2:


No they don't, you can use a symlink (mklink on windows) in order to link another folder into your repository that is not in the same parent folder.

See my answer to a similar question here: https://stackoverflow.com/a/19473449/471924



来源:https://stackoverflow.com/questions/15798696/do-all-files-have-to-be-in-the-repository-folder-when-using-mercurial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!