Graphite just totally lost my staged changes: ```...
# report-bugs
b
Graphite just totally lost my staged changes:
Copy code
(main):zap: % gt c -m "commit mst"
Running post-checkout hooks


✓ All post-checkout hooks passed


Unable to setup environment for pre-commit hook run:
STDOUT:
STDERR:fatal: Unable to create '/Users/bmulholland/dev/…/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
Running post-checkout hooks
and then my changes are gone
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
b
okay just found them in my stash, phew
but yeah, bad failure mode…
p
Apologies that you ran into that! Glad you were able to locate your changes. Let me flag to the eng team so they can take a look!
👍 1
j
does your hook stash your changes?
b
The hook uses https://github.com/sds/overcommit, which does look to do a pre-commit stash of unstaged changes. However, both staged and unstaged changes were lost when I did that. And this says it was running post-checkout hooks, not pre-commit. It’s possible something went wrong there? Feels off though