3 ms·
On undoing, fixing, or removing commits in git
- fnord77 9y agoeasiest method (this article glosses over it): use BFG 2000: https://rtyley.github.io/bfg-repo-cleaner/ https://rtyley.github.io/bfg-repo-cleaner/
- ereyes01 9y agoWhoa, this is a revelation. Thanks for posting!
- thrownaway954 9y ago"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 ;)
- feifan 9y agoStumbled across this the other day — life-saver. Very well-designed
- shakencrew 9y agoprevious discussions on Hacker News: https://news.ycombinator.com/item?id=6909146 https://news.ycombinator.com/item?id=6909146 and https://news.ycombinator.com/item?id=9661349 https://news.ycombinator.com/item?id=9661349
- _ikke_ 9y agoWe 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.
- fzeroracer 9y agoI 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.
- cdubzzz 9y agoAlso check out: http://ohshitgit.com/ http://ohshitgit.com/