Community-Lab introduction

Help: touch
Login

The "touch" command:

Usage: fossil touch ?OPTIONS? ?FILENAME...?

For each file in the current checkout matching one of the provided list of glob patterns and/or file names, the file's mtime is updated to a value specified by one of the flags --checkout, --checkin, or --now.

If neither glob patterns nor filenames are provided, it operates on all files managed by the currently checked-out version.

This command gets its name from the conventional Unix "touch" command.

Options:

--now
Stamp each affected file with the current time. This is the default behavior.
-c|--checkin
Stamp each affected file with the time of the most recent check-in which modified that file.
-C|--checkout
Stamp each affected file with the time of the currently-checked-out version.
-g GLOBLIST
Comma-separated list of glob patterns.
-G GLOBFILE
Similar to -g but reads its globs from a fossil-conventional glob list file.
-v|--verbose
Outputs extra information about its globs and each file it touches.
-n|--dry-run
Outputs which files would require touching, but does not touch them.
-q|--quiet
Suppress warnings, e.g. when skipping unmanaged or out-of-tree files.

Only one of --now, --checkin, and --checkout may be used. The default is --now.

Only one of -g or -G may be used. If neither is provided and no additional filenames are provided, the effect is as if a glob of '*' were provided, i.e. all files belonging to the currently-checked-out version. Note that all glob patterns provided via these flags are always evaluated as if they are relative to the top of the source tree, not the current working (sub)directory. Filenames provided without these flags, on the other hand, are treated as relative to the current directory.

As a special case, files currently undergoing an uncommitted merge might not get timestamped with --checkin because it may be impossible for fossil to choose between multiple potential timestamps. A non-fatal warning is emitted for such cases.