Skip to content

Instantly share code, notes, and snippets.

@mcastelino
mcastelino / git_rebase_to_squash
Last active September 14, 2023 17:50
github code review workflow for branches
Thought I would document something that helps speed up github code review process for people who have lots of PR's in flight that build
on top of each other
My normal workflow involves
1. Branch off of master for PR1 on branch branch_pr1
2. Submit a PR from branch_pr1 (head of this branch is sha_pr1_old)
3. Wait for code review comments ##
4. Continue development for PR2 on branch_pr2 which is off of branch_pr2 (you have branched off at sha_pr1_old)
5. Submit a PR from branch_pr2
6. When you get code review feedback for branch_pr1, incorporate it and squash them back on branch_pr1 (to keep a clean history on github)