1

I pushed a file which contains some password on my git repository. How can I remove it? Because I removed it in the latest version (git rm) but it's still accessible using previous commits.

There is a solution about that?

Thanks.

Vadorequest
  • 16,593
  • 24
  • 118
  • 215
  • How many commits happened after the problematic one? – bereal Oct 21 '13 at 06:50
  • I think you can't, you can `reset` the commit but then your history will be messed up. – Ashish Gaur Oct 21 '13 at 06:50
  • About one hundred commits after the problematic one. In fact, the repo was private at start and I made it public yersteday, today I remembered that one file contains some passwords. – Vadorequest Oct 21 '13 at 09:37

1 Answers1

3

GitHub has a good article about that. It's not GitHub specific, and will work with any git repository.

fjarri
  • 9,546
  • 39
  • 49