I'm wondering if squashed commits in a rebase can be visible+accessible to other people. I'll illustrate a quick example. Assume this is all happening on my local machine in a local git repo.
- I make a commit 'X' with env secrets (oh no!)
- I make a commit 'Y' that removes the committed env secrets along with some other unrelated code changes
- I then rebase by squashing the 2 commits (e.g.
git rebase -i HEAD~2
) so that my commit with the env secrets has been squashed
Question: If I then push my commit to a public repo, would another person (assume a bad actor) be able to somehow pull the changes and search for the squashed commit which contains the env secrets?
Note: I understand from here that reflog commits are still accessible locally, but I'm asking not from a local repo perspective, but rather from the perspective of someone on another machine pulling my new commits. Additionally, I don't mind if squashed commit messages (emphasis on message) are still visible such as in the case someone forgets to comment them out during the rebase, the question I have is concerned with the squashed commits themselves.
Thank you!!