In playing with my webapp, I added files containing passwords to my git repo. I’ve since removed them, but I’d like to start a new git repo that doesn’t have the commits when the passwords were included (I’ve changed the passwords, just like to start anew).
Is there someway I can grab a git repo without grabbing all the history? Or should I just copy the folder and start a new git repo in the copied folder? How would I start a new git repo, just remove the .git folder and then rerun git init?
You are correct, if you know you don’t want any of the history just delete the .git folder and rerun
git init. Another option, if you would like to keep your history, is to follow this excellent Github guide on removing sensitive data.