Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git "Cannot create a tree from a not fully merged index"

I changed a long list of files in Visual Studio 2013, and am now trying to commit them as well as sync them with the changes that others have made (We are using bitbucket, if that makes a difference). When trying to commit, I entered the commit message, but then get the error

"An error occurred. Detailed message: Cannot create a tree from a not fully merged index. "

I am not very experienced with git, so any help would be greatly appreciated!

like image 886
Jesse Avatar asked Sep 11 '15 17:09

Jesse


1 Answers

I just had this same problem. Raina77ow linked to the answer, but to elaborate here: open a git Bash in your working directory and run git status. From there, you will see what your problems are.

For me, it's often because of a unresolved merge conflict. If there are unmerged paths and you want to use your local changes, i.e. mark which files are the conflict resolution, run git add [filePath\fileName].

If you want to discard the changes, i.e. unstage the file, use git reset HEAD [filePath\fileName].

like image 130
RandonneurLibre Avatar answered Sep 28 '22 06:09

RandonneurLibre