Describe the feature or problem you’d like to solve
I've been reviewing many PRs recently, and the workflow is typically:
gh pr checkout <PR number>
gh pr merge <PR number>
git switch main
git branch -D <PR name>
git pull
I tried using gh pr merge -d
gh pr checkout <PR number>
gh pr merge -d <PR number>
as it automatically
- deletes local and remote branches
- switches to default branch
- pulls the merged commit
but it does not work due to reasons mentioned in #2860.
Proposed solution
almost every time when i review a PR from other's fork,
- i want to keep their remote branch (as it's theirs)
- but i want to delete the local PR branch i've
gh pr checkouted (to keep my local branches clean), then switch to main and pull the changes.
a new flag, --delete-local could address this issue. after the feature gets added, my workflow would look like:
gh pr checkout <PR number>
gh pr merge --delete-local <PR number>
Describe the feature or problem you’d like to solve
I've been reviewing many PRs recently, and the workflow is typically:
I tried using
gh pr merge -das it automatically
but it does not work due to reasons mentioned in #2860.
Proposed solution
almost every time when i review a PR from other's fork,
gh pr checkouted (to keep my local branches clean), then switch to main and pull the changes.a new flag,
--delete-localcould address this issue. after the feature gets added, my workflow would look like: