If you're a single developer, just go for it. If you have already pushed your changes, then things might become complicated. They are written for Linux, but should work on OS X and even on Windows if you use Git Bash. Hereby an overview per scenario in increasing order of complexity.Īll of these methods assume that you are familiar with console commands. Depending on where the file is, you can use several methods. Simply git rm passwords.txt won't do it, as the file will still be there in all previous commits. Do you want to be the person who committed AWS keys to a public GitHub repository, only to find out 24 hours later that ~USD2000 has been spent mining bitcoins? Several methods The goal is to completely wipe a file out of existence in a Git repository, to cover all tracks of your horrible mistake. Have you already committed an SSH private key, a password file or a config file with sensitive data to your repository before? In case you did not, I would recommend to first try this out before you continue reading this blogpost.įor the rest of us: DON'T PANIC! Take a deep breath, get up from your desk, walk around for a few minutes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |