程序员 删除所有git仓库提交历史,变成一个新仓库 新建latest_branch分支 1 git checkout --orphan latest_branch 加入仓库 1 git add -A 提交更改 1 git commit -am "something" 删除master分支 1 git branch -D master 重命名当前分支为master 1 git branch -m master 最后push到远程仓库 1 git push -f origin master