Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To avoid unintended merges, git-flow aborted

Tags:

git

git-flow

We are using git-flow. We work on several different feature branches and keep getting this error:

develop|✔ ; git flow feature pull origin RWT-6-valves
Trying to pull from 'feature/RWT-6-valves' while currently on branch 'develop'.
To avoid unintended merges, git-flow aborted.
Fatal: 

Generally, reverting to an earlier version of develop works. However, this is a pain. Thus the question:

How to avoid this message in the future?

like image 790
Sardathrion - against SE abuse Avatar asked Oct 11 '13 09:10

Sardathrion - against SE abuse


1 Answers

I have seen this message too. This is how I am dealing with:

First of all, try sync:

git checkout master
git pull
git push

git checkout develop
git pull
git push

After that, you can try the command again:

git flow feature checkout MY_FEATURE_NAME

If the problem persist, try this:

git checkout develop
git flow feature track MY_FEATURE_NAME
git flow feature checkout MY_FEATURE_NAME
git pull origin feature/MY_FEATURE_NAME

I don't know explain why this error happens. But, I hope this commands can help you to deal with.

If you really want to know why this message is happening, maybe a good first step to do it is look under the hood, and study the source-code of the git flow here https://github.com/raoulmillais/hgflow/blob/master/git-flow-feature#L495.

like image 103
Thiago Mata Avatar answered Sep 27 '22 18:09

Thiago Mata