Multiple Git repositories for each Eclipse project or one Git repository

后端 未结 5 601
半阙折子戏
半阙折子戏 2021-01-30 00:54

I am in the process of moving to Git from SVN. In SVN I had multiple eclipse projects in a single SVN repository that is convenient for browsing projects. I was going to move to

5条回答
  •  一整个雨季
    2021-01-30 01:36

    It depends on how closely-related these projects are. Ask yourself the following questions:

    • Will they always need to be branched/tagged together?
    • Will you want to commit over all projects, or does a commit mostly only touch one project?
    • Does the build system operate on all of them or do they have a boundary there?

    If you put them all in one, some things from above will be easier. You will only have to branch/tag/stash/commit in one repository, as opposed to doing it for every repository separately.

    But if you need to have e.g. separate release cycles for the projects, then it's necessary to have each project in an independent repository.

    Note that you can always split up a repository later, or combine multiple repositories into one again without losing history.

    Combining is a bit harder to do than splitting, so I would go for one repository first and see how it goes.

提交回复
热议问题