Here's what I did:
git status
displays all my changes.git add -A
git commit -m "Foo"
. A pre-commit git hook fires with husky
and lint-staged
.git commit -m "Foo"
again and immediately cancel.git status
is clean, git log
and git reflog
do not show a new commit.Why did my changes get reverted? How do I recover them?
OK, it was lint-staged
to blame. It stashed my changes.
So running git stash apply
recovered them!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments