I'm working in a master
develop
fb
branch way on git.
I create a fb
feature branch from develop
Once my work is done, I push fb
to origin/fb
and do a pull request (with azuredevops) on fb
to develop
then fb
to master
In the pull request to master
I can see previous commits before the branch creation which are other merges on develop
Develop
---P0---P1---P2-------------------
| FB
----M1----M2--------
Master
---P0-----------------------------
I don't want P1
and P2
to be merged on master because other developers are waiting for tests before merging onmaster
What are my options?
- Create a branch from
P0
(and cherry-pick myfb
commits to fix my case), onlyP1
andP2
want to be merged too, but in the future if there are other previous non commited commits? - I saw a previous thread where you create a branch from
master
, cherry-pickfb
's commits into it and merge this branch to master... Seems complex. - Is there a way to merge only
fb
's commits or is it anti-pattern?
What is the correct gitflow for this? In general when do we create a feature branch?
Thank you in advance!