2012-11-01 95 views
4

我有一個從我的git代表刪除敏感數據的問題。 我閱讀手冊頁https://help.github.com/articles/remove-sensitive-data,並按照說明逐一。無法刪除敏感數據

起初我這樣做成功:

$ git clone https://github.com/defunkt/github-gem.git 

下一個我這樣做是與更迭

$ cd github-gem 

,然後我嘗試沒有成功以下,並得到了以下消息

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

fatal: ambigous argument 'rm': unknown revision or path not in the working tree. Use '--' to seperate paths from revisions 

有人可以幫忙嗎?

回答

1

我認爲即使用--ignore-unmatch你仍然需要--消歧器。像:

git rm --cached --ignore-unmatch -- Rakefile 
           ^^-this two dashes here 
+1

thx for reply。我試了一下,但得到了同樣的錯誤信息:-(也許它有助於知道我正在使用Windows 7。 – user1791336

2

我知道它已經有一段時間,但爲後人的緣故: 我現在這個問題了一會兒戰鬥 - 在Windows的解決方案是使用「(雙引號)代替'(單引號)