Skip to content

Instantly share code, notes, and snippets.

@ospatil
Forked from lopezjurip/script.sh
Last active October 2, 2021 15:36
Show Gist options
  • Save ospatil/b86cb8d2438ff57d03a39a4bfe8de789 to your computer and use it in GitHub Desktop.
Save ospatil/b86cb8d2438ff57d03a39a4bfe8de789 to your computer and use it in GitHub Desktop.
Github full code review
# Create empty branch. git switch --orphan <branch name> deletes ALL files from the working tree. We don't want that.
git checkout --orphan review
# or delete only the required files that you need to review. For example, for nats project only delete go source files.
# find . -type f -name '*.go' -not -name '*test.go' -not -path '*/vendor/*' -delete
git rm -rf .
git commit --allow-empty -m "Create empty branch"
git push --set-upstream origin review
# Create `project` branch from `main` current state.
git switch -c project
git merge main --allow-unrelated-histories
git push --set-upstream origin project
# Open a Pull-Request on the Github repository from `project` to `review`. Then you can perform a full-code review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment