I have internal github in our organization. There is a particular git repo where I need to replace a sensitive string from all commits. There are around 2000 commits and the sensitive string is there from first commits. There are 7 valid branches as well. How can I delete/replace the sensitive string from all commits. I dont have internet access for the machine nor I have privileges to download bfg repo cleaner tool. I am trying my luck with git filter-branch command below. But this has not helped yet.
git filter-branch -f --msg-filter 'sed "s/sensitivedata/noman/g"' -- --all
If nothing works my last resort is to delete the repo and create new one. But before doing that I wanted to see if I have an option preserving existing commits. Any help and light towards this is highly appreciated.