Git Quickie: Safely Reverting to older commit

 

This is the safest and easiest way to change your current commit to an older commit:

git revert --no-commit 447fcd3..HEAD
git commit

0766c053 is the hash of your commit, so look through the commit history to find the previous commit you want and paste it there.

Once that completes, git push and you should be good to go!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s