Hey all! I asked in a session earlier today about ...
# how-do-i
m
Hey all! I asked in a session earlier today about reverting a stack, and the response was that, since commits are squashed into one,
gt undo
or a
git reset
should handle it. However, if there are multiple PRs, then each one will have a separate commit. I'm still curious about how these cases are best handled? I found this section in the Graphite docs mentioning a
gt stack revert
command, but with this doc being last modified 1 year ago, and
gt stack -h
showing the following, it's clear this command isn't around anymore. Is there a new best practice for full stack reverts?
Copy code
❯ gt stack -h
gt stack <command>

Commands:
  gt stack restack  Ensure each branch in the current stack is based on its parent, rebasing if necessary.
                                                                                          [aliases: r, fix, f]
  gt stack submit   Idempotently force push all branches in the current stack to GitHub, creating or updating
                    distinct pull requests for each.                                              [aliases: s]
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 Max, unfortunately there isn’t a single “revert the whole stack” command. you would need to revert each PR’s resulting commit one at a time. Will make sure that doc gets updated!
m
Okay, good to know. Thanks Brett!