Skip to content

Using GitUp Snapshots

Pierre-Olivier Latour edited this page Mar 2, 2016 · 4 revisions

Overview

Snapshots are a very powerful feature of GitUp which will likely save your day in the future: think Time Machine for your repository. While a repository is open in GitUp, the app will automatically take "snapshots" representing the entire state of the repository whenever needed. You can then rollback to an older repository in one click.

Where Do Snapshots Live

Taking and storing snapshots does not affect your repository in any way: snapshots just live "in parallel" with the repository. They are stored inside the co.gitup.mac subdirectory of the .git directory of the repository. Snapshots are therefore preserved if you move your repository around on your computer or even to another computer. However they are not uploaded to remotes and cannot be shared with other members of your team.

Previewing and Restoring Past Snapshots

Start by choosing "Browse Snapshots…" in the "Repository" menu: the right pane that appears provides the list of all snapshots for the repository.

Click on a snapshot to preview it in the map area. You can navigate the map as usual and use features like Quick View. However all editing operations are disabled.

If you want to restore the Git repository to the state of the selected snapshot, just click "Restore". That's it!

Tips

  • As usual with GitUp, if you restored the wrong snapshot, you can undo with Cmd-Z or from the "Edit" menu

Limitations

  • If GitUp is not running, the app cannot obviously take snapshots for the repository (however the next time you open it in GitUp, it will immediately take a snapshot if needed)
  • For snapshots taken because of changes outside GitUp, the app will just say "Changed outside GitUp" for the description as it doesn't really know what was done
  • When restoring a snapshots, GitUp will restore the HEAD, tags, local branches and their configuration (e.g. upstream), but leave other references untouched (e.g. remote branches or stash) as it wouldn't make sense to restore them
  • Only the last 100 snapshots are kept