I just recently started using git flow but I am running into issue all the time. I believe I do not fully understand the process of merging a feature. I am running into merge conflicts all the time and getting errors that my develop
and origin/develop
have diverged. This is my process...
I want to make changes to develop, so I create a feature...
git flow feature start MYFEATURE
Now I am in feature MYFEATURE
locally. So I make the changes I want and I git add
then git commit
then git push
to my MYFEATURE
.
Now I want to merge my feature to develop but in the meantime, other devs have pushed to develop branch so mine is not up to date. So to update it I do...
git pull origin develop
This gives me lots of conflicts, so I fix them and then I git push
. At this point I try to merge my feature and I get more errors, my steps must be wrong.
Anyways then I do...
git flow feature finish MYFEATURE
and it tells me my local is ahead by x commits, so I do,
git push
Can someone show me the right process of doing this, step-by-step? I think I am not entirely sure how this is working.
After pulling
develop
branch intoMYFEATURE
, push the changes to remote. Then checkoutdevelop
branch, pullMYFEATURE
intodevelop
, then push to remote.