TheDocumentation 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.
create command saves the current state of your working directory, including staged changes, unstaged changes, and untracked files.
Syntax
Parameters
name(optional): A descriptive name for the snapshot. If omitted, only the hash will be used as the identifier.
What gets saved
A snapshot captures three categories of changes:- Staged files: Files added to the index with
git add - Unstaged files: Modified tracked files not yet staged
- Untracked files: New files not ignored by
.gitignore
Examples
Create a named snapshot
Create an unnamed snapshot
Create with explicit command
Behavior
- If there are no changes to save (no staged, unstaged, or untracked files), the command outputs “No changes to save” and exits without creating a snapshot
- Each snapshot is stored with a unique 8-character hash generated from the timestamp and random data
- Snapshots are stored in
$XDG_DATA_HOME/git-snapshots(defaults to~/.local/share/git-snapshots) - The snapshot includes metadata about the repository, branch, commit, and creation time
The
create command is the default action when no command is specified. Running git-snapshot foo is equivalent to git-snapshot create foo.Snapshot metadata
Each snapshot stores:- Repository remote URL (if configured)
- Repository path
- Current branch name
- Current commit hash
- Creation timestamp
- List of staged, unstaged, and untracked files