Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
asgs112751ygit 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 -
Tell him to copy his code from the commit he wants.
---
Follow me for more terrible tech tips. -
ZaLiTHkA8411y@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.
-
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.
Related Rants
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.
rant
gits-using-git