1

If you realize that you saved some sensitive data (user:pass, an access token etc) in some version of the git repositiory, what can you do to get rid of it, without sacrificing the whole repository?. Is it possible to scrap that current revision only. Will git figure out the gaps automatically?

1 Answer 1

3

GitHub has a nice article about it:

https://help.github.com/articles/remove-sensitive-data

Essentially, you use git filter-branch to rewrite the history of your project, removing files with sensitive content.

Sign up to request clarification or add additional context in comments.

1 Comment

But make sure you have a backup of your repo when playing around with filter-branch and forcing the gc to remove old blobs. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.