LinuxCommandLibrary

fossil-rm

Remove files from the Fossil repository

TLDR

View documentation for the original command

$ tldr fossil delete
copy

SYNOPSIS

fossil rm [OPTIONS] FILENAME...

PARAMETERS

FILENAME...
    One or more paths to files or directories to be marked for removal from the repository. If a directory is specified, all tracked files within it are recursively marked for removal.

--if-exists
    Do not generate an error if a named file or directory does not currently exist in the repository.

--dry-run
    Show which files would be removed without actually performing the operation or modifying the repository.

--repository FILE
    Specifies the Fossil repository database file to use instead of the one found in the current directory or specified by the FOSSIL_REPOSITORY environment variable.

DESCRIPTION

The fossil-rm command is used to mark one or more files or directories for deletion from the Fossil SCM repository. This operation stages the files for removal, similar to git rm or svn delete in other version control systems. The actual deletion from the repository's history only takes effect after a subsequent fossil commit operation. By default, fossil-rm only marks the file for deletion within Fossil; it does not remove the file from the local working directory. It is crucial to understand that files marked for removal with fossil-rm are still part of the repository's history and can be recovered using fossil undo or by checking out an earlier version.

CAVEATS

fossil-rm only marks files for deletion; they are not actually removed from the repository's history until a subsequent fossil commit is performed.

By default, fossil-rm does not delete the file from the local working directory. You must manually remove it using rm or similar if you wish to clear it from your filesystem.

Removed files are still part of the repository's historical record and can be retrieved later using commands like fossil checkout or fossil undo.

WORKING DIRECTORY IMPACT

Unlike some other version control systems where the remove command might also delete the file from the local filesystem, fossil-rm by default only stages the deletion for the repository. This distinction is important for users transitioning from other SCMs.

RECURSIVE REMOVAL

When a directory name is specified as an argument, fossil-rm recursively marks all tracked files within that directory for removal from the repository.

HISTORY

fossil-rm is an integral command within the Fossil SCM system, which was created by D. Richard Hipp (also known for SQLite) and first publicly released in 2007. It provides essential version control functionality for managing file lifecycle within Fossil repositories. Its design aligns with Fossil's overall philosophy of being a simple, self-contained, and single-file executable for source code management.

SEE ALSO

fossil add(1), fossil commit(1), fossil mv(1), fossil status(1), fossil undo(1), rm(1)

Copied to clipboard