2
ZaLiTHkA
339d

Sitting at my desk, happy tapping away at code, and one of our newer team members asks a general question (4 of us in the office)....

"Uh.. how do I undo a git revert?"

🤔🤦

FML... Very much looking forward to leaving this place next year.

Comments
  • 7
    git revert the reverted commit

    By the way, questions like these especially from newer developers are not unexpected. Git is not exactly straightforward and can quite some time to master
  • 5
    Tell him to copy his code from the commit he wants.
    ---
    Follow me for more terrible tech tips.
  • 1
    @asgs for sure, I've been using it for well over a decade already and I still get myself and my repos all twisted up at times... These are not "new devs" though, just relatively new to our team.. this particular guy has been with us for about 3 months now.
  • 0
  • 0
    In your position, I would... Just answer the question, but also explain the difference between reverting and undoing a commit. If they're still just working in a local feature branch rather than needing to revert a historical commit, it's much better to just undo the commit in question rather than revert it and pollute the history with two unnecessary commits.
Add Comment