新建空白分支,加入git,删除master,改名为master,git -f上传,OK 具体如下操作: 1.Checkout
git checkout --orphan latest_branch
-
Add all the files
git add -A
-
Commit the changes
git commit -am "first commit"
-
Delete the branch
git branch -D master
5.Rename the current branch to master
git branch -m master
6.Finally, force update your repository
git push -f origin master