fossil-init
Create a new Fossil repository
TLDR
Create a new repository in a named file
SYNOPSIS
fossil init [options] REPOSITORY_FILENAME
PARAMETERS
-A
, --admin-user
NAME
Sets the administrator user's name for the new repository. If not provided, the command prompts for it.-D
, --admin-pass
PASSWORD
Sets the administrator user's password. If not provided, the command prompts for it.-F
, --force
Overwrites an existing repository file if it already exists at the specified path, without prompting for confirmation.-h
, --help
Displays a brief help message and exits.-k
, --no-fsck
Skips the initial integrity check (fsck) after repository creation. Use with caution as it bypasses a verification step.-u
, --user
NAME
Sets the default user associated with initial check-ins for the new repository.--project-name
NAME
Assigns a human-readable name to the new project, which can be displayed in the Fossil web UI.--template
TEMPLATE_REPO
Initializes the new repository using a pre-existing template repository, copying its initial structure and settings.--create-directory
Creates the parent directory for the repository file if it does not already exist during initialization.
DESCRIPTION
fossil init
is the foundational command for starting a new project managed by the Fossil SCM system. It creates an empty Fossil repository file, which is a single, self-contained SQLite database. This database will store all project data, including source code versions, commit history, wiki content, ticketing system, forum discussions, and project timeline.
Unlike other SCMs that might scatter data across .git
or .svn
directories, Fossil consolidates everything into one file, making it exceptionally portable and easy to back up. When executed, fossil init
prompts for an administrator username and password (unless provided via options), which are essential for managing the new repository. This command is typically the first step before adding files, making commits, or sharing the repository. The resulting repository file can be directly used for local operations or served via HTTP for remote access.
CAVEATS
If the target REPOSITORY_FILENAME
already exists, fossil init
will abort unless the -F
or --force
option is used. Using --force
will irrevocably delete and overwrite the existing repository. The administrator username and password are critical for future repository management; choose strong credentials and remember them.
REPOSITORY STRUCTURE
A Fossil repository is fundamentally a single SQLite database file (e.g., project.fossil
). This file contains all versions of all files, the complete commit history, wiki pages, forum posts, tickets, and user accounts. This unique design greatly simplifies backup, migration, and general management, as the entire project history and data reside within one portable file.
ADMINISTRATOR CREDENTIALS
Upon initialization, fossil init
requires an administrator username and password. These credentials are vital for managing repository settings, user accounts, and permissions within the Fossil web interface. If not provided via the -A
or -D
command-line options, Fossil will interactively prompt the user to enter them.
HISTORY
Fossil SCM was created by D. Richard Hipp, the author of SQLite, in 2007. Designed to be simple, self-contained, and reliable, fossil init
has been a core command since its inception. It embodies Fossil's design philosophy of a single-file repository that encapsulates all project data, including source control, bug tracking, wiki, and forum functionalities, offering a unique and robust approach to software configuration management.