git rebase 使用总结: 使用git rebase 修改以前已经提交的内容 比如要修改之前的commit的 hashcode为:187f869c9d54c9297d6b0b1b4ff47d2ec781a55e 1,git rebase 187f869c9d54c9297d6b0b1b4ff47d2ec781a55e^ --interactive --退回到要修改的commit的前一个点上,执行后,git会调用默认的vi编辑器显示commit到最新commit的所有记录,把我们要修改的…
git删除所有历史提交记录,只留下最新的干净代码 1.Checkout git checkout --orphan latest_branch 2. Add all the files git add -A 3. Commit the changes git commit -am "commit message" 4. Delete the branch git branch -D master 5.Rename the current branch to master git bra…