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.
- 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