I created a feature branch from master branch. After that there is a commit [F1] from feature branch.
[F1] -- Feature Branch
/
[M1]-[M2] -- Master Branch
After that, feature branch is merged in master branch, and there are two more commits [M3] and [M4] in master branch.
[F1] -- Feature Branch
/ \
[M1]-[M2]-[F1]-[M3]-[M4] -- Master Branch
Now I added two more commits to feature branch.
[F1]-[F2]-[F3] -- Feature Branch
/ \
[M1]-[M2]-[F1]-[M3]-[M4] -- Master Branch
At this time, should I first rebase the feature branch to master branch, so that feature branch has change of [M3] and [M4] commits, or should I do the git merge directly.
Also, if I do git rebase first, won't the [F1] commit be in both the branches:
[F1]-[F2]-[F3] -- Feature Branch
/
[M1]-[M2]-[F1]-[M3]-[M4] -- Master Branch