I'm still trying to get a clean merge of stacked P...
# how-do-i
d
I'm still trying to get a clean merge of stacked PRs as a new user. I created a stack of two
gt create
's I switched to 1st branch and did
gt submit
I switched to 2nd branch and did a second
gt submit
I went to the graphite web site for the first PR and clicked "merge" I switched to the 2nd branch in the stack and did a
gt sync
I did NOT delete the 1st branch (sticking with old patterns for now until I have full success with graphite) I did a
gt restack
and was told the first branch did not need to be restacked on main and the 2nd branch did not need to be restacked on the 1st branch. I went to the graphite web page for the 2nd PR and I see this a UI which seems to be telling me my PR is ready to approve and merge (left side of screenshot) and my PR is not ready to merge (right side of screenshot) and there is no guidance I can find on what to do to resolve this disagreement.
a
Hey @Don Alvarez. Apologies for the confusing experience. After you merged the first PR,
gt sync
should have prompted you to delete the first branch locally. Did you see that?
d
Yes, I saw the option to delete and as I mentioned I chose not to delete (sticking with old patterns until I am confident I'm merging correctly with Graphite). I chose not to delete. Graphite didn't indicate there was anything workflow breaking about that choice, it simply asked me if I wanted to delete and I said no. Is that a problem? If so, I highly recommend adding one line of code to the CLI that tells the user what to do or tells them the implications of not deleting.
a
I chose not to delete. Graphite didn't indicate there was anything workflow breaking about that choice, it simply asked me if I wanted to delete and I said no.
I think it is fine not to delete it locally. However, you might need to move the second branch onto
main
to make this work correctly.
Copy code
$ gt checkout main
$ git log // Ensure first PR is in main
$ gt checkout <second branch>
$ gt move --onto main
$ gt submit
> Is that a problem? If so, I highly recommend adding one line of code to the CLI that tells the user what to do or tells them the implications of not deleting. cc @Jacob Gold. Should we have some messaging here?
d
Yow - there's zero chance I would have stumbled upon that 5 step process of what to do after simply picking the non-default choice in an option I was given after submitting my first PR. Again, improved messaging is absolutely needed here. That question is clearly one where the user needs to understand "we're giving you a choice, but if you pick exercise that choice, the your user experience will suffer significantly"
Also, even though I chose "no" it appears that graphite deleted my local copy of the branch. I realize that I still have the origin copy, but it's VERY VERY bad that, after being asked whether to delete something and saying no, that graphite did indeed delete the thing I said not to delete.
The
gt move --onto main
resulted in
(branch name) does not need to be restacked on main
refreshing the website still shows the same ready to merge/not ready to merge combo
Do we still want me to do a
gt submit
at this point?
a
Does
gt log
show your second branch being based off main?
d
Copy code
◉ 2nd-branch (current) 
│ 73 minutes ago
│ 
│ PR #8 (Ready to merge) pr name
│ <https://app.graphite.dev/github/pr/yoDon/reponame/8>
│ Last submitted version: v1 (local changes, need submit)
│ 
│ bd77f59 - commit name
│
◯ main 
│ 77 minutes ago
│ 
│ 60ebfcc - pr name (#7)
│
a
Gotcha, yes you can
gt submit
this
Which should allow you to merge it correctly
d
that unblocked the merge button in the website, which I clicked.
a
So what I think happened here: after the first PR merged, and you synced & restacked, the first PR branch was not deleted, which keeps the second branch PR pointing to the first PR branch.
But totally agree that we should make this experience more clear re what to expect
d
I have many friends whose opinions I respect that love Graphite, so I'm going to stick with it, but there is no way as a new user of a non-alpha product that I should be able to get into this much trouble simply by picking a non-default option presented to me in the most basic workflow provided by the product. The UX team needs to read this report over and address it. It's simply not acceptable for a non-alpha product to have this readily accessible a failure mode like this.
I happened to be in the slack, so I could report it. The majority of users would simply walk away.
➕ 1
a
Agree, thanks for the feedback
d
I believe in what you're doing and want you to succeed. You can't fix the bugs you don't know about. I get it.
j
That reflects in the detail of your report and patience here! Thank you for both 🙂