git: create “temporary” integration branch

前端 未结 2 1424
故里飘歌
故里飘歌 2021-02-13 23:36

I am relatively new to using git.

recently from master we branched +-10 feature branches. lets call them A, B, C, etc.

I want to merge these all together for tes

相关标签:
2条回答
  • 2021-02-14 00:12

    Short answer: yes.

    Long answer: yes and, assuming no changes are made to your master branch in the meantime, your merge to master will be a "fast forward" merge so after [master] git merge integration, the master branch will look like the integration branch prior to the merge.

    The "branch history" will appear in the master branch. IMHO it's best not to think of your history as "branch history", rather as "code history".

    If you want to record the fact the change came from a merge, use git merge --no-ff to force the creation of a merge commit even when a fast-forward commit (which keeps history linear when possible) would work.

    See also Correct Git workflow for shared feature branch?

    0 讨论(0)
  • 2021-02-14 00:15

    Sure, that's fine.

    By default (unless you squash merge commits), you'll retain the full history of each feature, and the history of their integration, even once the temporary branch is gone.

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