Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bug: Aborting conflict resolution still stages file when using external tool

1. Right click on an unstaged file > Resolve Conflicts > Launch External Merge Tool

2. Externa tool is opened, SourceTree shows "Visual Merge In Progress" window with Abort button

3. After I click Abort and close external, SourceTree moves the unstaged file to staged files and in unstaged file new ".orig" file is left


My expectation is that since I aborted the the conflick resolution, it should leave the file in unstaged section. Right now I have to manually mark the file as unresolved. Also, if there are multiple files in Staged files, it is sometimes hard to find the file.


I tried reporting this as a bug but your bug tracking website does not allow me to do that - the Create issue window has only Cancel button...

1 answer

0 votes
Mike Corsaro Atlassian Team Feb 13, 2019

Hello! This is a result of the return code your merge-tool is returning back to Git. You can read more about this here

What does the "Abort" button do if it's not aborting the conflict resolution?

Mike Corsaro Atlassian Team Feb 14, 2019

It just closes the dialog and terminates the process. I assume git then updates the index when your tool closes.


You can see the same behavior Sourcetree does by doing the following via the terminal:

  • Have a conflicting file in your repo
  • Run:
    • git mergetool -y --tool=YOUR_MERGE_TOOL -- YOUR_FILE_NAME
  • Wait for the mergetool to start
  • Kill the git.exe process via task manager
  • Close the merge tool and observe that "git status" no longer reports a merge conflict

It just closes the dialog and terminates the process. I assume git then updates the index when your tool closes.

It does not terminate the process. Tested with p4merge and with WinMerge. I have to close the tool myself. To me it looks like the button does nothing.



  • git mergetool -y --tool=YOUR_MERGE_TOOL -- YOUR_FILE_NAME

Yes you are right, git behaves in the same way. In the config I see following:

mergetool.sourcetree.cmd='C:/Program Files/Perforce/p4merge.exe' "$BASE" "$LOCAL" "$REMOTE" "$MERGED"

After running:

git mergetool -y --tool=sourcetree -- myfile

and closing p4merge window and choosing not to save changes, the file is indeed moved to staged.



So I understand that SourceTree is simply calling git to do the merge resolution using mergetool, and I'd have the same issue if I was using git directly.

Still, is there no way to abort a conflict resolution using external tool, in a way that the file is not staged and that it's still marked as having unresolved conflict?

I am having the same issue. Is there a way to tell git to leave the file unresolved? When the external merge tool aborted or otherwise did not complete the merge.

Maybe there's something similar to setting git config mergetool.<tool>.trustExitCode to 0/false in Sourcetree?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,262 views 4 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you