+12
Completed
Stash should be saved prior to merging into branch with local changes, to allow for safely aborting the merge
This has bitten me a couple times now.
If you have local changes (unstaged) and you right-click on a different branch and choose "merge" and then select "create merge commit", SmartGit does not create a stash prior to initiating the merge.
If the merge goes bad, and you abort it, you will lose all of your local changes when SmartGit aborts the merge.
If SmartGit first created a stash (as it does for pull operations), this loss of work could be avoided by recovering from the stash.
Repro:
- Make some changes locally in master but do not stage or commit them
- Initiate a merge into master from another branch (using the "create merge commit" dialog option), such that conflicts are created during the merge
- Click the "Merge" button on SmartGit to abort the merge
- When the "Do you want to reset your working tree?" dialog appears, press "abort merge"
Result: after the abort completes, the local workspace is clean and all local changes have been erased.
- In step (3), it would be helpful if the "Merge" button would change to "Abort Merge" in this situation, for discoverability
- In step (4), this dialog is a little confusing. It asks if you want to reset your working tree, but the buttons say "abort merge" and "cancel". For clarity, I recommend A) changing "Do you want to reset your working tree?" to "Do you want to abort the merge and reset your working tree?", B) changing "abort merge" to say "Yes, abort merge"
Customer support service by UserEcho
I know this isn't the highest-voted request, but this just bit me yet again today. Any possibility of getting it into an upcoming build?
Note: relates to "Faster merge workflow: Support auto-stashing for merging in the same way it is already supported for pulling"
Since 18.1 preview 2, SmartGit is using "git merge --abort" now which should resolve this problem.