sourcegit-scm/sourcegit

[Feature Request] Discarded changes should be saved in a dated file in the Trash

Opened this issue ยท 11 comments

GitHub Desktop can save discarded changes in the Trash, this would be a nice feature. ๐Ÿ˜

Discarded changes are saved in a dated file in the Trash

Why not use Stash if you want to keep worktree clean and up to date to HEAD, and also save the changes before to another place?

Why not use Stash if you want to keep worktree clean and up to date to HEAD, and also save the changes before to another place?

Sure, but sometimes when Iยดm on fire, I miss to make a stash or use the option while checkout ๐Ÿ˜…

I've the same requirement. Switching branches asks how to deal with changes. The last choice is restored and if you're a little bit off you'll discard your changes.

The discarding dialog should be enhanced by an option to store that changed to trash or not.

I've the same requirement. Switching branches asks how to deal with changes. The last choice is restored and if you're a little bit off you'll discard your changes.

The discarding dialog should be enhanced by an option to store that changed to trash or not.

This is why I didn't want to add the feature requested in #185 in the first place...

adding the option to store will only make the dialog more verbose/confusing. With still the same issue of being slightly off resulting in a discard. The current approach lets you safely close the dialog if you want to stash your changes manually. I'm on the side of love-linger here.
remembering options for these actions is asking for trouble. Sane defaults are the better way to go combined with actual preference choices that are remembered (rebase vs merge on pull for example). But anything that is potentially dangerous or never a 'sane default' should not be remembered

I've had a similar problem several times this week. I was in a hurry and didn't pay too much attention to what option was selected for local changes when doing a pull or merge. Unfortunately it was 'discard', which sourcegit remembered from last time. Can we at least agree that it's a bad idea to pre-select 'discard'?

Can we at least agree that it's a bad idea to pre-select 'discard'?

that, i can agree with, although i'm very happy that the stash & apply option is remembered (my company uses rebasing a lot which makes this a required feature to happily work with git)

I decide not to record the last selected handling method for uncommitted local change anymore. Instead, the default option is Do Nothing (let git decide how to handle it - when there are modified files, git will prevent related operations). If necessary, users can change the handling method according to the actual situation on their own.

not what i had hoped, but i agree on this decision, this is the smartest solution. only other option (but i will not pursue this) would be to have a preference for the default of this setting, but where are we going then haha

Image

Hello,

This request is still in discussion? I implement this feature but I can't tested it on Linux and Mac.
Can I still make a PR or post the file to be review?

BR,
Xavier

#1516