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
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.