开发者

I Know I Can Make an Empty Branch in Git, Should I?

I have some code that is Java EE 5. I want to start porting it to 6.

I was thinking I would do 开发者_JS百科this:

  1. Make a new empty branch (no code in it).
  2. Start writing the 6 code on that branch, no rebasing, etc.
  3. Make topic branches, rebasing/merging to the version branch.
  4. When it's done, make a final version branch from master (of the old version) and delete master.
  5. Make master from the new code.

Does this sound loopy? The project is one war and 2 jar projects. I'd really rather not make 3 new repositories for this.


Honestly, your system seems convoluted. Why not just branch 6 from 5, make topic branches from 6, cherry pick commits into 5 when necessary, and otherwise do a rolling rebase on top of the 5 branch?

You seem to be thinking like an SVN user here.


Ended up making another repository. There is no real reason to try to deliver a completely different codebase from the same repo for one simple reason: no intention of putting any more effort into the Java EE 5 version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜