• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Computing / git warning: path is unmerged

git warning: path is unmerged

Last updated on August 30, 2019 by Sal Ferrarello

After running

git stash pop

I get the message

Auto-merging salcode/src/example.php
CONFLICT (content): Merge conflict in salcode/src/example.php

I want to go back to ignoring any new changes in this file and go back to the version stored in Git. If I try to correct this with

git checkout salcode/src/example.php

It fails with the error

error: path ‘salcode/src/example.php’ is unmerged

This can be fixed by the following two lines:

git reset salcode/src/example.php
git checkout salcode/src/example.php
Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit
Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Solution Tagged With: Git

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in