0

I forgot to delete a comment line in my commit and wonder how to delete a specific I don't want to use git revert because I already pushed other commits. I do the git-filter-repo method but it throw me an error of on git push origin --force --all. I just want to delete the commit to cleanup the history of Github...

I already do this once but don't remember how. I checked the Git doc but doesn't find the way to do it and I don't understand why Gitguardian doesn't allow us to remove these. I am the only one on this project an no one has forked/cloned the project. This is also a public folder.

Any advice ?

JoCoz
  • 11
  • 4
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+sensitive+commit – phd Nov 15 '21 at 17:33
  • Esp. see https://stackoverflow.com/a/32840254/7976758 – phd Nov 15 '21 at 17:34
  • "it throw me an error", care to tell us what the error message was? If you filtered away the commit locally, and did a force-push, that should've worked. – Lasse V. Karlsen Nov 15 '21 at 17:36
  • @phd all of this doesn't work. @Lasse V.Karlsen For the "Bfg repo-cleaner" on `java -jar bfg.jar --replace-text private.txt my-repo.git`I got "Unable to access jarfile bfg.jar" despite I downloaded it ; `git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" \ --prune-empty --tag-name-filter cat -- --all` Wich PATH ? the relative PATH from my local or the PATH from github? ` git push --force --verbose --dry-run` got "No configured push destination." – JoCoz Nov 15 '21 at 18:03

0 Answers0