Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mubshrx/git-snapshot/llms.txt

Use this file to discover all available pages before exploring further.

The list command displays all snapshots, with filtering options to show snapshots from the current repository or all repositories.

Syntax

git-snapshot list [--all]

Options

  • --all, -a: Show snapshots from all repositories instead of just the current one

Output format

By default, list shows snapshots for the current repository:
Snapshots for my-project:

  my-feature (a1b2c3d4)
    branch: main | created: 2026-03-03 14:23:45

  experiment (b5c6d7e8)
    branch: develop | created: 2026-03-02 09:15:30
With --all, it includes the repository name:
All snapshots:

  my-feature (a1b2c3d4)
    repo: my-project
    branch: main | created: 2026-03-03 14:23:45

  bugfix (f9a8b7c6)
    repo: other-project
    branch: hotfix | created: 2026-03-01 16:42:18

Examples

List snapshots for current repository

git-snapshot list
Output:
Snapshots for my-app:

  refactor-auth (d4e5f6a7)
    branch: main | created: 2026-03-03 11:20:15

  c8d9e0f1
    branch: feature/new-ui | created: 2026-03-02 15:45:22

List all snapshots

git-snapshot list --all
Output:
All snapshots:

  refactor-auth (d4e5f6a7)
    repo: my-app
    branch: main | created: 2026-03-03 11:20:15

  wip-changes (a2b3c4d5)
    repo: other-repo
    branch: develop | created: 2026-03-01 09:30:00

Using short flag

git-snapshot list -a

Behavior

  • Snapshots are matched to repositories by comparing the remote URL first (if both have one), then falling back to the repository path
  • If no snapshots exist, the output shows “No snapshots found”
  • Snapshots are displayed with their name (if provided) and hash
  • For unnamed snapshots, only the hash is displayed
  • Created timestamps are shown in UTC format, converted from ISO 8601
The list command requires you to be in a git repository, even when using --all. This is because repository matching is needed to determine which snapshots belong to which repos.

Empty state

If no snapshots exist for the current repository:
Snapshots for my-project:

  No snapshots found