Git : Going back in time

time_traveser_in_git

Git makes it simple to do a time travel seamlessly. One can easily get to any state of application without much hassles, just by a simple click of git. Actually git preserves the delta of code and applies it when any checkout that revision.
Traditionally if as a developer I have made changes before the demo and found out at the last moment that application is screwed. Now it is difficult to take previous version of all files where app was stable using SVN since there is nothing like local commit. However with “SVN update revisionnumber” one can get back the remote application state. With git making restore point by local commit and reverting back to it is possible. This eliminates the need to take a backup at every stable state since it can be attained at any point in time at any development sand box itself. In short with git you can have restore point in your local machine as well by the means of local commits.

git reset <revision number>

git –hard <revision number>

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