Posted By

cphoover on 08/03/12


Tagged


Versions (?)

Remove sensitive data from git history


 / Published in: Bash
 

  1. git filter-branch --index-filter 'git rm --cached --ignore-unmatch configuration.php' HEAD
  2.  
  3.  
  4. ## skip if already in ignore file
  5. echo 'configuration.php' >> .gitignore
  6. git add .gitignore
  7. git commit -m "modified ignore file"
  8.  
  9. git pull
  10. git push origin master --force

Report this snippet  

You need to login to post a comment.