Skip to content

Instantly share code, notes, and snippets.

@cute-angelia
Created July 12, 2021 01:24
Show Gist options
  • Save cute-angelia/2ccaac29774f98357aa865df077b35be to your computer and use it in GitHub Desktop.
Save cute-angelia/2ccaac29774f98357aa865df077b35be to your computer and use it in GitHub Desktop.
Git删除所有提交历史记录
.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