4

I have a problem with removing sensitive data from one of my git reps. I read the man page at https://help.github.com/articles/remove-sensitive-data and followed the instructions one by one.

at first I did this with success:

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

next I did this with succes

$ cd github-gem

and then I tried the following with no success and got the following message

$ 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

Could someone help?

Mat
  • 202,337
  • 40
  • 393
  • 406

2 Answers2

2

I know it's been a while, but for posterity's sake: I fought with this issue for a while now - the solution on Windows is to use " (double quote) instead of ' (single quote).

Haljin
  • 91
  • 1
  • 9
1

I think even with --ignore-unmatch you still need the -- disambiguator. Like:

git rm --cached --ignore-unmatch -- Rakefile
                                 ^^-this two dashes here
Jan Hudec
  • 73,652
  • 13
  • 125
  • 172
  • 1
    thx for reply. i tried it but get the same error message :-( maybe its helpful to know that i am working with windows 7. – user1791336 Nov 01 '12 at 13:18