git清空提交记录
切换到新的分支
1 | git checkout --orphan latest_branch |
缓存所有文件(除了.gitignore中声名排除的)
1 | git add -A |
提交跟踪过的文件(Commit the changes)
1 | git commit -am "commit message" |
删除master分支(Delete the branch)
1 | git branch -D master |
重命名当前分支为master(Rename the current branch to master)
1 | git branch -m master |
提交到远程master分支 (Finally, force update your repository)
1 | git push -f origin master |