fatal: cannot do a partial commit during a merge. Completed with errors, see above

With the new version of SourceTree (1.9.0), I am getting commit errors that I was not seeing before.

The main one is trying to Commit changes brought to a branch from a Merge. the local repo contains other changed files that I do not want to associate with the commit (basically, I only want to commit the files that were changed from the merge, and leave the other files out of the commit). It used to be possible prior to 1.9.0. 1.9.0 broke that option.

any workaround?

1 answer

Try stashing/shelving the changes in your local repo prior to the merge.

that's inconvenient as it adds more steps to the process, and error prone, as it's easy to forget to stash; and also, once I stash, I can not test the results of the merge: the files that were already in the local repo are for Settings/Testing purposes.

It is generally advisable to keep settings files out of the repository (they can be in the working directory, but ignored). If you have them in the repo for documentation purposes, I recommend putting them in with an extra piece in the filename.

For example, if your settings are in 'settings.ini', rename the settings.ini in the repo to settings.default.ini, then make it part of standard deployment steps to copy that file to 'settings.ini', then modify it. If this occurs in a repository working copy, the 'settings.ini' file can be safely ignored.

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

276 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot