Resetting to an Old Revision

In this episode, we're going to restore our complete project to an older version.

Transcript
Resetting to an Old Revision

In this episode, we’re going to restore our complete project to an older version. Put another way, this means we’re setting our HEAD pointer to a previous commit - and effectively, any commits that came afterwards will disappear from our commit history.

Let’s look at a practical example… and say that we want to return to this commit here. In Tower’s history view, we can simply right-click that commit and select “Reset HEAD” from the menu. If you leave the “keep changes” option checked, then Tower will preserve all of the changes in the rolled back commits.

I’ll show you what I mean: if we were to reset to this commit here, the “keep changes” option would preserve the changes from this and this commit as local changes. You can then decide for yourself which changes you actually want to keep or further modify.

The other alternative is to disable the “keep changes” option. And this is very simple: you are left with a clean working copy and no local changes whatsoever.

That’s already it - we have now successfully reset our project to an old version.