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.
Not in a git repository
Error:Error: Not in a git repository
This error occurs when you try to run git-snapshot outside of a git repository.
Solution:
-
Navigate to a git repository directory:
-
Verify you’re in a git repository:
-
If the directory isn’t a git repository, initialize one:
Snapshot not found
Error:Error: Snapshot 'name' not found
This error appears when the snapshot you’re trying to access doesn’t exist.
Solution:
-
List all available snapshots for your repository:
- Verify the snapshot name or hash you’re using matches exactly
-
Check if the snapshot exists in a different repository:
Snapshot belongs to different repository
Error:Error: Snapshot 'name' belongs to a different repository
This occurs when you try to restore a snapshot that was created in a different git repository.
Solution:
Snapshots are repository-specific and cannot be restored across different repositories. This is by design to prevent conflicts and maintain data integrity.
If you need to:
- Use the snapshot in the original repository where it was created
- Or create a new snapshot in your current repository
- Remote URL (if configured):
git config --get remote.origin.url - Repository path (fallback): The absolute path to the repository root
Multiple snapshots match
Error:Multiple snapshots match 'query'
This happens when your search query matches more than one snapshot.
Solution:
- The tool will display a numbered list of matching snapshots with their hash, branch, and creation date
-
For
restore,show, ordeletecommands, you’ll be prompted to select a specific snapshot -
To avoid ambiguity, use the full 8-character hash instead of a name:
Unknown option error
Error:Error: Unknown option '-xyz'
This occurs when using an invalid command-line option.
Solution:
Check the available options for the restore command:
--staged-only- Restore only staged changes--unstaged-only- Restore only unstaged changes--untracked-only- Restore only untracked files
Missing arguments
Error:Error: Please provide a snapshot name or hash
This error appears when required arguments are not provided.
Solution:
Ensure you provide the snapshot identifier when using these commands:
Rename conflicts
Error:Error: Snapshot 'new-name.hash.snapshot' already exists
This occurs when trying to rename a snapshot to a name that’s already in use.
Solution:
- Choose a different name for the snapshot
-
Or delete the existing snapshot with that name first:
Permission issues
If you encounter permission errors when creating or accessing snapshots: Solution:-
Check permissions on the snapshots directory:
-
Ensure you have write permissions:
-
If using
XDG_DATA_HOME, verify the environment variable:
No changes to save
Message:No changes to save
This appears when you try to create a snapshot but have no staged, unstaged, or untracked changes.
Solution:
This is informational, not an error. Make some changes before creating a snapshot:
-
Check your repository status:
-
Make changes, stage files, or create new files before running:
Snapshots directory location
By default, snapshots are stored in:~/.local/share/git-snapshots(standard)$XDG_DATA_HOME/git-snapshots(if XDG_DATA_HOME is set)