Skip to content

Instantly share code, notes, and snippets.

@filipebraida
Created June 29, 2020 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipebraida/cc80924077b3fe24a8c6c2b44ab8fc11 to your computer and use it in GitHub Desktop.
Save filipebraida/cc80924077b3fe24a8c6c2b44ab8fc11 to your computer and use it in GitHub Desktop.
Create Empty Orphan Branch for Code Review
# review branch
git checkout --orphan review
## remove under the git
git ls-files | xargs git rm --cached
## remove files
git clean -fxd
# create start point
git commit --allow-empty -m "Start of the review"
# create empty branch
git branch empty
# merge review point
git merge master --allow-unrelated-histories # merge with prev branch(= probably master)
# push to origin
git push origin review
git push origin empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment