Fossil

Documentation
Login

add

The often used add command is how you tell fossil to include a (usually new) file in the repository.

fossil is designed to manage artifacts whose role is being "source" for something, most probably software program code or other text. One can imagine all kinds of ways to let fossil know just what constitutes a source; the simplest and most direct way it actually finds out is when you give it the fossil add file command.

It's reasonable to think of the import and clone commands as very high-powered versions of the add command that are combined with system level file movement and networking functions. Not particularly accurate, but reasonable.

Typing fossil add myfile causes fossil to put myfile into the repository at the next commit—provided you issue it from within the source tree, of course.

Note that the repository is not changed by the add command, but by the commit command. add myfile tells fossil to "mark" myfile as part of the repository. Only commands which actually manipulate the content of the "source" artifacts can physically put the file into (or remove it from) the repository.

Just to keep things confused, there are also commands that can manipulate the repository without affecting the checked-out sources (see fossil pull, for instance.)

See also: fossil rm, fossil import, fossil clone, fossil commit, fossil pull, fossil setting (async), Reference