Snapshots the last commit. Once this method returns, the snapshot information is persisted in the directory.