If I have two branches, master
& secret
. And I commit sensitive data into secret
, but never push secret
, only push master
to a public repo. If I never merge between them, only rebase secret
, is there any chance my sensitive data could end up in the remote repository index somehow?
Use-case: I keep my ~/.config
directory of all my machines in a public Git repository. However there's some programs which need passwords and aren't able to use environment vars. My idea is keeping different branches for sensitive data for each machine, and using git hooks to deny sensitive data into branch master
, and disallow pushing machine branches publicly. But I'm worried