Created
July 12, 2021 01:24
-
-
Save cute-angelia/2ccaac29774f98357aa865df077b35be to your computer and use it in GitHub Desktop.
Git删除所有提交历史记录
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
.PHONY: resetgit | |
resetgit: | |
git checkout --orphan latest_branch | |
git add -A | |
git commit -am "init repo" | |
git branch -D master | |
git branch -m master | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment