1.清除git提交记录
1.切换到新的分支,这时候就没有了git提交记录
git checkout --orphan latest_branch
2.缓存所有文件(除了.gitignore中声明排除的)
git add -A 提交暂存区
3.提交跟踪过的文件(Commit the changes)
git commit -am "commit message" //提交本地仓库,这时候只有这一次提交记录
4.删除master分支(Delete the branch)
2.取消上次提交记录
git reset --soft HEAD~