Hey all, graphite newbie here. I'm having a hard t...
# how-do-i
a
Hey all, graphite newbie here. I'm having a hard time understanding how to get out of the state I'm in right now, let me explain. I've pushed 4 pr onto the same stack. The top one is submitted as draft, while all the other ones are already merged. So far so good. At some point I've changed the commit title, and didn't get that this would create another pr. Basically I now have 2 different PR in the stack and without graphite I would just rebase/squash so that the top 2 commits become a single one. I have no idea how to do that with graphite. The gui doesn't allow deleting or folding 2 prs from the same stack, and I haven't had any luck with the cli either.
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
a
this is the ui: I would like to end up squashing the 2 drafts PR into a single 1
locally i have this:
Copy code
* 8dcc1fb (HEAD -> 08-07-feat_be_implement_pagination_middleware, origin/08-07-feat_be_implement_pagination_middleware, BAK2) feat(be): add HTTP middleware for pagination
* 713cf17 feat(be): add HTTP middleware for pagination
* 047c630 (origin/08-06-feat_be_implement_pagination_middleware, 08-06-feat_be_implement_pagination_middleware) feat(be): implement pagination middleware
I tried git rebase and ended up with the most recent commit
8dcc1fb
being an empty commit...
I managed to somewhat solve my situation by doing
Copy code
gt delete
gt restack
The problem is that by doing so the topmost PR has been disconnected from the stack, maybe because the other pr in the stack were already on main? i'm not sure.
p
Sorry for the friction here Aurelien. You can use
gt fold
, but you'll have to submit and close the unwanted PR. In the future, if you want to modify a PR instead of creating a new one, you can use
gt modify
a
I think I probably messed up in the first place by creating instead of modifying the pull-request. Thanks for the support and awesome tool