Archive for the 'SCM' Category

Apr 14 2010

fatal: git checkout: updating paths is incompatible with switching branches.

Published by michael under GIT

Using GIT I tried to pull down a new remote branch using:

git checkout --track -b my-branch-name origin/my-branch-name

When I did this I got this error message:

fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/my-branch-name' which can not be resolved as commit?

This error message was a tad confusing. The solution in my case was simple though, apparently you can’t switch to a different remote branch if your local master is not up-to-date with the remote origin/master so performing:

git pull

resolved the issue and after this I was able to successfully pull down the remote branch.

One response so far

Feb 04 2010

GIT Fatal You Have not Concluded Your Merge MERGE_HEAD Exists

Published by michael under GIT

fatal: You have not concluded your merge. (MERGE_HEAD exists)

I got this message because when I performed a “git pull”. I searched for a solution for this problem on the Internet and it wasn’t until I found this post that I was able to resolve this issue. The problem was that I:

  1. Performed a “git pull” and the automatic merge failed and I ended up with merge conflicts
  2. I resolved the merge conflicts and added the resolved files back using “git add”
  3. Performed a new “git pull” and got the “Fatal You Have not Concluded Your Merge MERGE_HEAD Exists” error

Apparently step 3 overrides MERGE_HEAD, starting a new merge with a dirty index. According to the post this is a common mistake made by programmers that are used to version control systems where the user follows an “update” and “commit” work flow.

So how do we resolve this issue? What worked for me was to follow the instructions for how to “Undo a merge or pull inside a dirty work tree” found here.

  1. I used “git reset –merge ORIG_HEAD”
  2. I resolved the merge conflicts again and added the resolved files back using “git add”
  3. I was then finally able to “push” my changes!

According to the documentation if you run a “git reset –hard ORIG_HEAD” it will let you go back to where you were before you were trying to commit your changes, however you will lose local changes. Most likely not what you want to do. Using “git reset –merge” will let you keep your local changes. You will however have to re-resolve your conflicting merge files.

Some additional information on this topic can be found here.

6 responses so far

Aug 24 2009

svn: Inconsistent line ending style when trying to commit a binary file

Published by michael under SCM,Subversion / SVN

If you get this error message “svn: Inconsistent line ending style” when trying to commit a binary file into your SVN repository then Subversion probably thinks that your file is a text file.

First verify your file with:

svn proplist <your-file>

If the result contains svn:eol-style but you know that your file is a binary file then you have a problem where Subversion thinks the file is a text file even though it’s not. We fix this by first deleting the erroneous properties and then adding the ones we want.

svn propdel svn:eol-style <your-file>
svn propset svn:mime-type application/octet-stream <your-file>

Verify your file again with the command below

svn proplist <your-file>

If everything worked it should say svn:mime-type

No responses yet