Merge the specified pull request following this exact workflow:
- •
Squash and merge the PR (no merge commits):
bashgh pr merge <PR> --squash --delete-branch
- •Use
--squashto combine all commits into a single commit - •Use
--delete-branchto automatically delete the remote branch after merging
- •Use
- •
Switch to the main branch and pull latest changes:
bashgit checkout main && git pull --prune
- •
--pruneremoves any stale remote-tracking branches that no longer exist on the remote
- •
- •
Clean up the local branch (if it exists):
- •If you were on a feature branch that was just merged, delete the local copy:
bashgit branch -d <branch-name>
- •
Report the result to the user:
- •Confirm the PR was merged
- •Confirm branches were cleaned up
- •Show the current branch and latest commit