說明:例如將代碼提交到git倉庫,將一些敏感信息提交,因此須要刪除提交記錄以完全清除提交信息,以獲得一個乾淨的倉庫且代碼不變git
git checkout --orphan latest_branchit
git add -Aast
git commit -am "commit message"test
git branch -D masterdate
git branch -m masterfile
git push -f origin masterco