参考:

        Steps to clear out the history of a git/github repository · GitHub

总结:

        凡是要上传仓库,必须要有至少一条提交

        rm -rf .git/

        git init

        git add .

        git commit

        git push -u -f master(或者其他分支名)

更多推荐