Hindsight is 20/20, or so they say. Working with your code is no exception. You commit a change and then realize it had a password in it that you shouldn’t be sharing.
In a centralized repository where every change is sent back to a main repository, you are almost out of luck. There are some hoops you can jump through if you have administrator access, but it might well corrupt data.
Git plans for this type of mistake, however. All your changes happen locally and are shared only when you push them to a public repository. Since you’re the only one who has to stay in sync, you can rewrite your history as much as you want!
Before we start, a word of caution: be careful how you use the commands in ...