Undoing Things

Tower allows you to undo many Git actions, simply by pressing the handy keyboard shortcut Cmd+Z.

Undoing Things

There’s a little keyboard shortcut that makes life a lot easier, and now it’s also available in Tower for Mac: CMD+Z. Starting from version 4.0, Tower allows you to undo many Git actions, simply by pressing this handy key combination.

Let’s take a closer look at some of the many scenarios where you can use CMD+Z.

The most likely situation where you will make use of this helpful feature is throughout the process of creating a commit. Using CMD+Z, you can quickly undo: staging and unstaging a file, discarding a chunk, and even deleting a file. You can, of course, also undo the commit itself. This will bring the changes back to your Working Copy.

You can also undo merging and rebasing. In our example scenario here, we’re merging two branches and we’ve run into a merge conflict. If we abort the merge but change our mind afterwards, we can simply press CMD+Z to undo it. We can now continue with the merge by resolving the conflict. Let’s finish by committing this merge. Pressing CMD+Z here will undo the merge and bring us back to the conflict screen.

If you want to undo the undo operation itself, no problem: you can press Shift+CMD+Z to redo the last action you have undone!

There are many other undo actions which didn’t make it into this episode: you can undo deleting a branch, deleting a stash, checking out a branch and more.

Give CMD+Z a try next time you need to undo something in Tower and see for yourself just how useful this feature is.