I am new to Git, although I just managed to change file in my previous commit.
First commit in redbox let's call it R1 is the one with commited password. I made it accidentally, so I wanted to make change - just change the file where that password was. I managed to do it successfully, not from the first time.
So I the commits the "path" to my head - last commit is the green box. These commits are same as the red one, but without the password.
So everything is as I wanted it to be, but I want to remove the 3 commits that are in a red box, cause password is still there.
Can you tell me how to do it?
I understand that this might be a duplicate, but I have a picture so maybe it will help to understand better.