2012-07-13 65 views

回答

1

Use the git filter-branch command to rewrite history

$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch Rakefile' --prune-empty --tag-name-filter cat -- --all 
+1

你在命令裏有什麼Rakefile?這與OP的問題有什麼關係? – t0mm13b 2012-07-13 02:27:22

+0

@ t0mm13b:這是一個示例文件名。 OP可以使用這個命令用密鑰銷燬文件的所有歷史記錄。 – SLaks 2012-07-13 13:20:27

+0

我會叫它YOUR_FILE ...我結束了谷歌搜索,並在這裏找到了同樣的文本塊:https://help.github.com/articles/remove-sensitive-data – 2012-07-14 18:13:07