Oooopsies, I accidentally did `gt modify -a` when ...
# how-do-i
e
Oooopsies, I accidentally did
gt modify -a
when I meant to do
gt create -a
... is there any quick way to undo that or do I have to attempt splitting
--by-hunk
?
d
git reflog
is your friend here!
👍 1
there should be a commit sha before you did the modify in the list
and a commit sha after (your current
HEAD
)
you want to
git reset <the before sha>
and you'll get unstaged files again
e
yup that did it. thank you! I keep forgetting about the power of using reflog.
d
someday it would be nice to have a
gt modify undo
but i'm scared of how to code that 100% bulletproof… but i bet someone at graphite has a scheme for achieving it
also idk if you had upstack branches?
e
Not gonna lie, I tried
gt undo
just to see if it would magically work.
I did not this was the top of the stack.
d
that's great news
since
gt modify
will
gt restack
also
i …think you could just
gt restack
again though?
🤞
anyways not a problem
p
We're thinking about
gt undo
:')
j
I be schemin