Skip to content

Instantly share code, notes, and snippets.

@satyadeepk
Forked from nicktoumpelis/git-make-empty-root.sh
Last active April 24, 2019 13:42
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 satyadeepk/b7c0816b512ffd8ab96223905aac2766 to your computer and use it in GitHub Desktop.
Save satyadeepk/b7c0816b512ffd8ab96223905aac2766 to your computer and use it in GitHub Desktop.
Create an empty initial commit for a pull request for new project
git checkout --orphan temp
git rm -rf .
git commit --allow-empty -m 'Make initial root commit'
git rebase --onto temp --root develop
git push origin --force develop:develop
git push origin temp:master
git branch -D temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment