RudyOnRails
RudyOnRails

Reputation: 1937

Can I erase all my commit history, but keep my files the same?

So, I needed to learn how to build a Shopify app, and am a fairly new developer, so I was playing around where to store my key and secret etc.

I'm probably going to store them in ENV variables on my dev machine and on Heroku. Question is this - how do I erase all the past commit data so that my keys and secrets get toasted?

My ideas as of now...google around and look for ways of deleting commits but keeping my files unchanged. OR...copying the entire directory, except /.git, and starting fresh.

I appreciate your help in advance. Kevin

Upvotes: 0

Views: 65

Answers (1)

David Grayson
David Grayson

Reputation: 87406

Just remove the .git directory and then do git init . to get a fresh start.

Upvotes: 6

Related Questions