You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm had issues with lefthook duplicating changes when running it on a repository that didn't have any commits. However now that I have commits I've just had an issue where I staged most of the changes but left some unstaged comments about changes that I still needed to apply and work I was progressing with. However after running lefthook (lefthook run pre-commit) it returned the following error and almost all the uncommitted changes were gone (untracked files were fine; 2 files with changes but none staged were fine; all files with some staged changes retained only the staged changes)
/workspaces/foo/.git/info/lefthook-unstaged.patch was missing almost all the changes and the 2 stashes named lefthook auto backup only contained the staged changes.
Does lefthook retain a backup of the changes it reverts? Is there a setting to not have it make destructive changes?
I can't think clearly now, having lost quite a bit of work, but the only thing I might have done is stage minor a change after running lefthook. lefthook runs quickly. I'm not sure if I even attempted it.
I think I've recovered most of changes using undoing, resulted in the changes reappearing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm had issues with lefthook duplicating changes when running it on a repository that didn't have any commits. However now that I have commits I've just had an issue where I staged most of the changes but left some unstaged comments about changes that I still needed to apply and work I was progressing with. However after running lefthook (
lefthook run pre-commit) it returned the following error and almost all the uncommitted changes were gone (untracked files were fine; 2 files with changes but none staged were fine; all files with some staged changes retained only the staged changes)/workspaces/foo/.git/info/lefthook-unstaged.patchwas missing almost all the changes and the 2 stashes namedlefthook auto backuponly contained the staged changes.Does lefthook retain a backup of the changes it reverts? Is there a setting to not have it make destructive changes?
I can't think clearly now, having lost quite a bit of work, but the only thing I might have done is stage minor a change after running lefthook. lefthook runs quickly. I'm not sure if I even attempted it.
I think I've recovered most of changes using undoing, resulted in the changes reappearing.
Beta Was this translation helpful? Give feedback.
All reactions