Re: [git-users] Feature idea: Warning for git reset --hard with unstaged local changes

2022-07-19 Thread Constantine Shulyupin
Would this help? --keep Resets index entries and updates files in the working tree that are different between and HEAD. If a file that is different between and HEAD has local changes, reset is aborted. On Mon, 18 Jul 2022 at

Re: [git-users] Feature idea: Warning for git reset --hard with unstaged local changes

2022-07-18 Thread Philip Oakley
> Still, implementing such mode is impossible in `git reset --hard` because it's being extensively used in scripts which must continue working unmodified. I'm more upbeat about the possibilities here for a multi-graded option for capturing the user's prior tree, with it's user modified

Re: [git-users] Feature idea: Warning for git reset --hard with unstaged local changes

2022-07-18 Thread Konstantin Khomoutov
On Mon, Jul 18, 2022 at 07:16:28PM +0300, Konstantin Khomoutov wrote: [...] > Another solution which seems logical at the first glance is using the "trash > bin" feature is the OS provides it but it also has practical problems: it is > never the core feature provided by the kernel, and Git is

Re: [git-users] Feature idea: Warning for git reset --hard with unstaged local changes

2022-07-18 Thread Konstantin Khomoutov
On Mon, Jul 18, 2022 at 07:51:48AM -0700, Maiasa Liger wrote: > A tale born through some hot tears at work... > > I had made a *temporary commit* on feature branch *A*, that I wanted to put > directly in the *master *(main) branch, as it was not related to the > feature. > > However, I had a

[git-users] Feature idea: Warning for git reset --hard with unstaged local changes

2022-07-18 Thread Maiasa Liger
A tale born through some hot tears at work... I had made a *temporary commit* on feature branch *A*, that I wanted to put directly in the *master *(main) branch, as it was not related to the feature. However, I had a lot of unstaged changes (read: 10+ hours of work) that I didn't want to