Text 24 Mar revert a previous version of a file via git

So, you want to roll back a file change in GIT.

check on which revision the change was introduced with a bit of:

git log

and double check with:

git show 0a9462908bbf14a3c68bf4a0d49f9770477ad068

checkout that file version before the found revision:

git checkout 3abac75f9eaa63bd5ab7b63457fc9fb570b34039 — db/seeds.rb

it’s now ready to be added and committed.


Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.