问题描述
我有5到10个独立的项目,我想使用Git进行版本控制。什么是组织项目/存储库的最佳方法:
- 为每个项目使用一个存储库
- 为我的所有工作使用一个存储库,并为每个项目使用子目录
- 或者完全不同的东西
- Use one repository for each project
- use one repository for all my work and use subdirectories for each project
- Or something completely different
什么最适合你,为什么?
我肯定会说每个项目都使用一个存储库。否则,你会在项目之间产生各种串扰,更不用说如果你使用命令行git,指定长路径是一种痛苦。 Git在每个项目模型的一个仓库中工作得很好,我真的不明白任何其他原因;我不认为我真的理解过为什么SVN会以这种方式进行工作。
I have 5-10 independent projects that I want place under version control using Git. What is the best way to organize the projects/respositories:
What has worked best for you and why?
I'd definitely say use one repository for each project. Otherwise you're going to have all sort of crosstalk between projects, not to mention it's a pain to specify long paths if you're using command line git. Git works great with the one repository per project model, I can't really see any reason to use anything else; I don't think I ever really understood why SVN promoted working that way.
这篇关于使用git时组织多个项目的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!