How do I remove sensitive files from git's history

Posted by Stefan Liebenberg on Stack Overflow See other posts from Stack Overflow or by Stefan Liebenberg
Published on 2009-05-16T14:49:17Z Indexed on 2010/06/14 8:12 UTC
Read the original article Hit count: 334

Filed under:

I would like to put a git project ( Rails app ) on github,

but it contains certian files with sensitive data ( usernames and passwords, like /config/deploy.rb for capistrano ).

I know I can add these filenames to .gitignore, but this would not remove the their history within git.

I also don't want to start over again by deleting the /.git directory.

Is there a way to remove all traces of a particular file in your git history?

© Stack Overflow or respective owner

Related posts about git