What is the proper git workflow for basing a project off a 'seed' repo?

后端 未结 5 643
渐次进展
渐次进展 2020-12-25 14:03

As an example: suppose you have a personal project like Angular Seed (which is a starting point for an Angular project https://github.com/angular/angular-seed).

Now

5条回答
  •  自闭症患者
    2020-12-25 15:03

    What you could do is:

    • initialize a new repo
    • reference your angular repo as a submodule of that new repo
    • push that new repo in your GitHub space.

    That way, your new project has:

    • a subfolder representing your seed project (which you don't modify)
    • all your data specific to your project.

    My issue with that is that a seed project isn't a library. It doesn't live in a subdirectory of a project. It IS the project when you start, and you build from there.

    Then a simple clone that you push back to your new repo is enough.
    But that won't keep any "fork" relationship between your two GitHub repos.
    You will have to pull one and push to the other through a local clone.

提交回复
热议问题