Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
On undoing, fixing, or removing commits in git (sethrobertson.github.io)
157 points by signa11 on Jan 30, 2018 | hide | past | favorite | 8 comments


easiest method (this article glosses over it): use BFG 2000: https://rtyley.github.io/bfg-repo-cleaner/


"The BFG treats you like a reformed alcoholic: you've made some mistakes in the past, but now you've cleaned up your act."

As a member of AA, I resemble that remark ;)


Whoa, this is a revelation. Thanks for posting!


I had to do a bit of history rewriting not too long ago. On my professional-facing repo I had some projects from back when I was in college where I had done a mixture of commits from both my professional persona and another username. It was only recently that I noticed and so I used git-filter-branch to clear out the commits I had made.

Thankfully it was a long-dormant project.


We link to this regularly in the #git irc channel on freenode. Seth used to frequent there, but he hasn't been there for a while.



Stumbled across this the other day — life-saver. Very well-designed


Also check out: http://ohshitgit.com/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: