Git workflow for maintaining a derivative fork

前端 未结 1 1036
遥遥无期
遥遥无期 2021-02-07 07:11

Overview

I have a project that is a customisation of an existing FOSS product. Its getting to the point where we\'re maintaining a long-term fork rather than applying

1条回答
  •  余生分开走
    2021-02-07 08:00

    Option 3 seems to represent to clearest separation of workflow between the two projects:

    • one with occasional contribution back to the original project, with pull requests
    • one with entirely new branches and code for the new application

    To facilitate the merges, I would recommend using hierarchical branch names in your repo, in order to clearly separate:

    • branches for your project development (classic names, no need for a '/' in them)
    • branches from the upstream/original repo (all prefixed with a name representing a branch from the original repo, like 'original/dev', for you to cherry-pick from or to)
      Those branches are already in their remotes/upstream namespace, but if you want to push back new commits, you need to create a local branch, and my point is: the name of that local branch should have a '/' in it, in order to clearly differentiate it with other regular branches for your project.

    0 讨论(0)
提交回复
热议问题