Last active
October 28, 2019 03:45
-
-
Save changbowen/7e3fe4d90290cef6cdadb9af9de7eb63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
git checkout --orphan latest_branch # orphan omits all the history | |
git add * # if you want to include all files (respecting gitignore). Otherwise make other changes here. | |
git commit -am "commit message" | |
git branch -D master # delete master branch | |
git branch -m master # rename current branch to master | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment