Git Snippet: Revert

From Coder Merlin
Jump to navigation Jump to search

Revert to Tag[edit]

git checkout 1.1.1
git diff master > ~/diff.patch
git checkout master
cat ~/diff.patch | git apply
git commit -am 'Rolled back to version 1.1.1'
git push origin master

Reference: (Stack Overflow)

Revert to Commit[edit]

git checkout -f 2599172 -- .
git commit -a

CoderMerlin™ proudly recommends:

Your purchase via these links helps keep  Coder Merlin™ 's orbuculum ablaze. As an Amazon Associate we earn from qualifying purchases. Thank you for your support!

Designed with pride in Silicon Valley, CA, USA