EDDYMENS

How To Roll Back To A Previous Commit Without Losing Git History

Viewing the logs

$ git log --oneline

Reverting the commits

01: git revert 123abcd 02: git revert abc1234

Doing it all together

01: git revert --no-commit HEAD~2..HEAD 02: git commit -m "Revert back to dfg4567"

[Back to table of content]