fossil-commit
Record changes to the Fossil repository
TLDR
Create a new version containing all the changes in the current checkout; user will be prompted for a comment
Create a new version containing all the changes in the current checkout, using the specified [m]essage
Create a new version containing all the changes in the current checkout with a comment read from a specific file
Create a new version containing changes from the specified files; user will be prompted for a comment
SYNOPSIS
fossil commit ?[--branch BRANCH] [--tag TAG]? ?[--message|-m TEXT]? ?[--no-prompt]? ?[FILE ...]?
PARAMETERS
--allow-empty
Allow commit with no changes
--allow-fork
Permit check-in forks
--branch <NAME>
Create new branch with given name
--bypass-checkin-msgs
Skip check-in message validation
--date-override <DATETIME>
Use specific commit date
--git
Export commit in Git format
--ignore-clock-skew
Ignore minor clock differences
--let-ghost-move-away-from-here
Allow ghost file renames
--message|-m <TEXT>
Use TEXT as commit message
--message-file|-M <FILE>
Read message from FILE
--no-prompt
Skip confirmation prompts
--no-verify
Bypass pre-commit hooks
--nosave
Don't save _FOSSIL_ file
--private
Keep check-in private
--summary
Show commit summary only
--tag <TAG>
Apply tag to check-in
--user-override <USER>
Override user identity
-v|--verbose
Enable verbose output
-n|--dry-run
Simulate without committing
DESCRIPTION
The fossil commit command records changes made to tracked files in a Fossil repository, creating a new check-in (version) with a user-provided message and optional tags or branches. It stages modified files by default but can target specific files. Fossil automatically detects added, edited, or deleted files via autosync unless disabled.
Key features include integration with Fossil's distributed model, where commits can push to remotes if autosync is enabled. It supports overriding dates, users, and hashes, and provides dry-run modes for preview. Unlike Git, Fossil commits are atomic and include full project state snapshots.
Usage involves editing files, running fossil commit -m 'message', and optionally specifying branches or private check-ins. It enforces check-in messages via hooks and skips unversioned or ignored files. Verbose output shows diffs, and it handles clock skew or fork resolution.
CAVEATS
Requires a Fossil repository; fails on merge conflicts. Autosync may push/pull unexpectedly. Ignores untracked/ignored files. Message length limited by config.
AUTOSYNC BEHAVIOR
Enabled by default; use fossil set autosync off to disable remote pushes/pulls on commit.
Conflicts halt commit.
FILE SELECTION
Without FILE args, commits all changes. Specify files to limit scope; use fossil changes to preview.
HISTORY
Introduced in Fossil 1.0 (2007) by D. Richard Hipp as core DVCS command. Evolved with Git compatibility, private branches (2009+), and hook support (2010s). Actively maintained in Fossil trunk.
SEE ALSO
fossil(1), fossil-diff(1), fossil-update(1), git-commit(1)


