πŸ”„ Validating (Merging) a Pull Request - as is

(no changes made to the PR)

Step Action GitHub CLI Lazygit
1 Open PR Go to PR page (e.g. github.com/repo/pr/1) (n/a) (n/a)
2 Review Read code, leave comments / approve (n/a) (n/a)
3 Merge PR Click β€œMerge pull request” β†’ confirm git checkout main && git pull origin main && git merge pr-1 Checkout main, f (fetch), then merge PR branch manually
4 Sync local main Auto after GitHub merge git pull origin main On main, press P (pull)

πŸ”„ Validating with Changes Made to the Pull Request

Step Action CLI LazyGit
1 Checkout the PR branch git checkout -b pr-1 origin/feature/builtin-pwd (if not local) or git checkout pr-1 Branches panel β†’ highlight feature/builtin-pwd (or local pr-1) β†’ press c (checkout)
2 Stage and commit your edits git add . β†’ git commit -m "Review: fixes applied for pwd builtin" Files panel β†’ select changes β†’ press a (stage all) β†’ then c (commit)
3 Push edits to the owner’s branch git push origin HEAD:feature/builtin-pwd Not possible – must use CLI
4 Merge the PR into main (with your edits) Go to GitHub PR page β†’ click Merge pull request β†’ confirm Not possible in LazyGit – must use GitHub UI
5 Delete branch Optional: git branch -d pr-1 β†’ git fetch --prune to clean up remote branches Branches panel β†’ highlight pr-1 β†’ press d (Delete local or local+remote)

Notes: