Git: cannot do a partial commit during a merge (SourceTree)

After updating the SourceTree to it’s latest version I am fighting with this issue. Assume following scenario:

There are file AB and C under the version control and there is just one branch. In my working copy, I make some changes to the file A so it turns into a A’ as well as the file B to B’. Someone else in his working copy makes a change to the file C -> C’.

I stage and commit my changes to the file B only. So I have a new revision: AB’C and working copy A’B’C.

The other one commits his changes, so he makes a revision ABC’ and pushes it to the origin.

And here it comes. When I perform the pull, I get some merge changes (the C’). And I want to commit a revision consisting of AB’C’. I do not want to do now anything with the modified file A. However, the GIT, SourceTree resp., fails with:

fatal: cannot do a partial commit during a merge.

untill I stage or discard changes to the file A.

I am pretty sure the some previous version of SourceTree did not expose this behavior.

Update 2017/05

It appears in the most recent SourceTree version 2.0.20.1 this issue has been resolved. However, be sure you want to update to this version, because it contains lot of “bugs” (new features) I really dislike.

Leave a Comment