Last active
December 1, 2023 10:58
-
-
Save philipstanislaus/88cea550a29c332e39a120f8b2d904fd to your computer and use it in GitHub Desktop.
Create empty git base commit for a full code review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create empty base commit that will be the reference for our code review | |
git checkout --orphan base | |
git rm -r --cached . | |
git clean -fxd | |
git commit --allow-empty -m "Start of the review" | |
# create and checkout review branch that will include the latest code that should be reviewed | |
git checkout -b review | |
# merge main branch into that new review branch | |
git merge main --allow-unrelated-histories --no-edit | |
# for a detailed explanation https://astrofrog.github.io/blog/2013/04/10/how-to-conduct-a-full-code-review-on-github/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the following to create a new commits with updates to the codebase that should be reviewed. This ensures the updates are
theirs
only.