To avoid inadvertent merges, git-flow is interrupted

We use git-flow . We work with several different branches of functions and continue to receive 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 development works. However, this is a pain. So the question is:

How to avoid this message in the future?

+6
source share
2 answers

I also saw this message. This is how I deal:

First of all, try syncing:

 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 persists, try the following:

 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 do not know why this error occurs. But hopefully these commands will help you deal.

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

+7
source

This is because you do not have a local RWT-6 branch.

You need to create a local branch

 $ git flow feature track RWT-6-valves Branch feature/RWT-6-valves set up to track remote branch feature/RWT-6-valves from origin. Switched to a new branch 'feature/RWT-6-valves' Summary of actions: - A new remote tracking branch 'feature/RWT-6-valves' was created - You are now on branch 'feature/RWT-6-valves' 

Then you can use the pull command

 $ git flow feature pull origin RWT-6-valves Pulled origin changes into feature/RWT-6-valves. 
+1
source

Source: https://habr.com/ru/post/955755/


All Articles