GIT rebase requires to recommit changes

前端 未结 3 670
天涯浪人
天涯浪人 2021-01-14 11:30

Before anything else, I\'m just new to git branching. I wasn\'t aware that every feature branch should be branched out from master and only use the pre-requisit

3条回答
  •  离开以前
    2021-01-14 12:18

    As far as I understand, the rules of your codebase (team) demand you to rebase your feature branch against the master. You could do that by saying git rebase --onto master A2 feature-2 which would mean "take commits of the feature-2 starting with A2 exclusive and place them on top of the master". You could then push your changes directly to master and drop or keep the feature-2 branch intact, again depending on the workflow conventions.

    If on the other hand, the rebase is not demanded - you could well do a simple merge of the feature-2 into master, pushing the change to the master, as @poke recommends.

提交回复
热议问题