đģ Git Quick Ref.
Just enough to be dangerous
echo $PWDCurrent dir the project dir? Great. Continue..
No? Then
cd ~/.sources/projectdirectory. See Bash prompt links belowgit add .Or:
git add example1.shgit commit -m "commit message"git pullgit push -u origin
This won’t remove it from clones or forks, but at least the repo will be scrubbed
BFG Repo-Cleaner linked below
vim ~/.bashrc++ alias bfg='java -jar ~/.sources/bfg-1.14.0.jar'source ~/.bashrcbgfvia new Bash promptsecho "sensitive_data_to_be_removed" >> ~/passwords.txtOR:
echo -en "data1\ndata2\ndata3" >> ~/passwords.txtcd ~/.sources/gitrepoThis will obviously work better in the repo directory
bfg --replace-text ~/passwords.txtCrucial step to clear repo history of that data
git reflog expire --expire=now --all && git gc --prune=now --aggressivebfgshould prompt you to issue the the above commandgit push --forceThat should do it. Good luck!