Hello, I have a forked repo as `origin` and a remo...
# how-do-i
m
Hello, I have a forked repo as
origin
and a remote repo as
remote
. How do I make graphite create a PR against the remote repo instead of the origin? I tried
gt repo remote -s remote
but got
Copy code
ERROR: Write access to repository not granted.
fatal: Could not read from remote repository.
✅ 1
j
I don't believe we currently support submitting to forks, unfortunately. It's something we might in the future!
d
@Min Yang, @Cameron Smith I am experiencing the same issue, but it looks like the comment is no longer present due to the 90 days policy. Is there a documented way of doing that? Thank you in advance 🙏
c
@Denis Grebennicov I never found a good solution to this as the workflow I experimented with would essentially be suboptimal to just using the gh cli alone. I think my comment from about two months ago may still be available, but here is a copy of it in case it is not.
This would be extremely helpful. For now I can get away with something like the following, but I have to cycle through each PR manually. Of course this defeats the value prop to an extent.
Copy code
# complete work on a branch and interactively rebase to desired commit order
# assume gh cli is set to relevant upstream

gt bsp # interactively set branch/pr breakpoints
gt ss # interactively configure draft PRs on your fork to be closed without merge

gh pr create -t "title" -b "body" -a "@me" -l "label" -d -r reviewername -m "milestone"
gh pr ready
# ...
gh pr merge -s # or maybe someone else does

# prepare and submit next pr up the stack

git fetch upstream main:main && gt rs -r && gt ss # agree to remove merged branch
gt bb # or otherwise checkout the next branch in the stack from which to submit a PR

gh pr create -t "title" -b "body" -a "@me" -l "label" -d -r reviewername -m "milestone"
gh pr ready
# ...
gh pr merge -s

# ...

# check that PRs and branches on your fork were successfully closed/removed