1. Checkout
$ git checkout --orphan latest_branch  // 基于当前分支创建新分支
  1. Add all the files
$ git add -A // 追踪全部文件
  1. Commit the changes
$ git commit -am "commit message" // 添加提交信息
  1. Delete the branch
$ git branch -D master // 删除主分支
  1. Rename the current branch to master
$ git branch -m master // 命名当前分支为主分支
  1. Finally, force update your repository
$ git push -f --set-upstream origin master // 强制推送并设置与远程分支的对应关系