[RAILS] After git pull, I can't git checkout. (error: you need to resolve your current index first)

I can't git checkout anymore. Why did the conflict disappear? ??

In team work, when I pulled a branch edited by another member, I couldn't go back to my working branch.

Cause

python


vocstartsoft:~/environment/app (develop|MERGING) $ git checkout [The branch you want to go back to]

error: you need to resolve your current index first

I did a git pull and resolved the conflict, but I can't checkout! The cause is that the branch status is MERGING. (The resolved conflict is not reflected in the repository.)

solution

python


vocstartsoft:~/environment/app (develop|MERGING) $

After resolving Conflict

python


vocstartsoft:~/environment/app (develop|MERGING) $ git add .
vocstartsoft:~/environment/app (develop|MERGING) $ git commit -m "comment"

If the conflict is resolved, you can commit and merge successfully. The description of "| MERGING" should have disappeared.

python


vocstartsoft:~/environment/app (develop) $

Recommended Posts

After git pull, I can't git checkout. (error: you need to resolve your current index first)
What to do if you can't find your API key after deploying to Rails heroku
I can't deploy! Resolve an error that can't be pushed to heroku (Rails Tutorial Chapter 1)