Git squashing commits with sensitive data

Let me say what I accomplished as:

A-B-C-DEFG

commit B contains some passwords (and some code changes) in commit G the passwords are removed (added to B) and now they are read from external files

so now there is no password in G, but if someone looks into the history, he can see the sensitive data from the B commit.

Can I do something with git rebase or some other tool?

+3
source share
1 answer

Yes. You can rewrite history in git. As long as you manage every clone of the repository, that is.

But it’s much more efficient just to change passwords and overcome it.

+5
source

Source: https://habr.com/ru/post/1760059/


All Articles