just curious, what does the `gt revert` command do...
# how-do-i
a
just curious, what does the
gt revert
command do differently to the
git revert
command? https://graphite.com/docs/command-reference#gt-revert-sha
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
Hey Ally, Instead of adding a revert commit to your current branch, it creates a new Graphite branch containing the revert commit. This means the revert becomes its own PR in your stack.
a
ah ok, thanks! i'm not sure if i'm missing something, but it isn't possible to create a stack of revert PRs is it, or to revert multiple commits in 1 PR? i tried doing
gt revert <1stsha>
then while on that branch,
gt revert <2ndsha>
and then
gt revert <3rdsha>
, but it created a new branch stacked off
main
each time. i didn't see anything in
gt revert --help
that would help/change the behaviour
p
youre correct there is not a way to stack these reverts. I suppose you could use regular `git revert <sha1> <sha2> <sha3`> then make it into a graphite branch or git revert <sha1> then gt modify to amend, then git revert <sha2> and gt modify again, etc.
a
thanks for confirming!