0

My team has done a silly thing and left passwords in older versions of my readme file, checked into the repo.

How can I avoid sharing these historic commits when I add a new team member who I don't want to see these passwords?

All of it is only on one file, but there are hundreds of commits that contain these passwords.

Alveoli
  • 1,202
  • 17
  • 29
  • 1
    Fork the repo maybe? – Andon M. Coleman Aug 12 '15 at 19:20
  • 3
    I think I'd copy all the files to a new folder and make a brand new repo. and share it from there. – jbchurchill Aug 12 '15 at 19:22
  • 1
    new branch won't do it, only solution is a new repo http://stackoverflow.com/questions/11297905/using-git-how-can-i-create-a-mostly-history-less-clone-of-a-repository – Claudiu Creanga Aug 12 '15 at 19:24
  • 2
    There's always the possibility to rewrite the entire history (e.g. see ['The Nuclear Option'](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History)) – MicroVirus Aug 12 '15 at 19:24
  • http://stackoverflow.com/a/872700/1860929 – Anshul Goyal Aug 12 '15 at 19:31
  • 2
    possible duplicate of [Remove sensitive files and their commits from Git history](http://stackoverflow.com/questions/872565/remove-sensitive-files-and-their-commits-from-git-history) – Anshul Goyal Aug 12 '15 at 19:32
  • Thanks all, the new repo is the way to go here - rewriting history is indeed a bit nuclear and scares me, I want to keep seeing the old history for myself. I will give it a try. – Alveoli Aug 12 '15 at 22:18

0 Answers0