2012-07-13 66 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