Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`git reflog`


I use this regularly. Mostly to answer one question. What was the name of that branch I was working on yesterday?

Or maybe you're suggesting it as a way to unravel a screwed up rebase. I don't know how to do that. But luckily I do know to abort, reset, and merge.


Yes, you can recover from a screwed up rebase or virtually any git problem you created via git commands. You find the commit before you rebased and reset to it. One reference: https://stackoverflow.com/questions/134882/undoing-a-git-reb...


Yes. That's literally what I did.




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

Search: