使用git时组织多个项目的最佳方式是什么? [英] What is the best way to organize multiple projects when using git

查看:113
本文介绍了使用git时组织多个项目的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有5到10个独立的项目,我想使用Git进行版本控制。什么是组织项目/存储库的最佳方法:


  • 为每个项目使用一个存储库

  • 为我的所有工作使用一个存储库,并为每个项目使用子目录

  • 或者完全不同的东西



  • 什么最适合你,为什么?

    解决方案

    我肯定会说每个项目都使用一个存储库。否则,你会在项目之间产生各种串扰,更不用说如果你使用命令行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:

    • Use one repository for each project
    • use one repository for all my work and use subdirectories for each project
    • Or something completely different

    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时组织多个项目的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆