diff options
| author | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
| commit | 4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch) | |
| tree | c296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /www/fiveminutes.wiki | |
| download | relic-4f49b16079b27d7ce633619e4cddfdf2bffbc952.tar.gz | |
Diffstat (limited to 'www/fiveminutes.wiki')
| -rw-r--r-- | www/fiveminutes.wiki | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/www/fiveminutes.wiki b/www/fiveminutes.wiki new file mode 100644 index 0000000..4ab51e4 --- /dev/null +++ b/www/fiveminutes.wiki @@ -0,0 +1,94 @@ +<title>Up and running in 5 minutes as a single user</title> + +<p align="center"><b><i> +The following document was contributed by Gilles Ganault on 2013-01-08. +</i></b> +</p><hr> + +<h1>Up and running in 5 minutes as a single user</h1> + +This short document explains the main basic Fossil commands for a single +user, i.e. with no additional users, with no need to synchronize with some remote +repository, and no need for branching/forking. + +<h2>Create a new repository</h2> + +<tt>fossil new c:\test.repo</tt> + +This will create the new SQLite binary file that holds the repository, i.e. +files, tickets, wiki, etc. It can be located anywhere, although it's considered +best practice to keep it outside the work directory where you will work on files +after they've been checked out of the repository. + +<h2>Open the repository</h2> + +<tt>cd c:\temp\test.fossil +<br> +fossil open c:\test.repo</tt> + +This will check out the last revision of all the files in the repository, +if any, into the current work directory. In addition, it will create a binary +file _FOSSIL_ to keep track of changes (on non-Windows systems it is called +<tt>.fslckout</tt>). + +<h2>Add new files</h2> + +<tt>fossil add .</tt> + +To tell Fossil to add new files to the repository. The files aren't actually +added until you run "<tt>fossil commit</tt>. When using ".", it tells Fossil +to add all the files in the current directory recursively, i.e. including all +the files in all the subdirectories. + +Note: To tell Fossil to ignore some extensions: + +<tt>fossil settings ignore-glob "*.o,*.obj,*.exe" --global</tt> + +<h2>Remove files that haven't been committed yet</h2> + +<tt>fossil delete myfile.c</tt> + +This will simply remove the item from the list of files that were previously +added through "<tt>fossil add</tt>". + +<h2>Check current status</h2> + +<tt>fossil changes</tt> + +This shows the list of changes that have been done and will be committed the +next time you run "<tt>fossil commit</tt>". It's a useful command to run before +running "<tt>fossil commit</tt>" just to check that things are OK before proceeding. + +<h2>Commit changes</h2> + +To actually apply the pending changes to the repository, e.g. new files marked +for addition, checked-out files that have been edited and must be checked-in, +etc. + +<tt>fossil commit -m "Added stuff"</tt> + +If no file names are provided on the command-line then all changes will be checked in, +otherwise just the listed file(s) will be checked in. + +<h2>Compare two revisions of a file</h2> + +If you wish to compare the last revision of a file and its checked out version +in your work directory: + +<tt>fossil gdiff myfile.c</tt> + +If you wish to compare two different revisions of a file in the repository: + +<tt>fossil finfo myfile</tt> + +Note the first hash, which is the hash of the commit +when the file was committed. + +<tt>fossil gdiff --from HASH#1 --to HASH#2 myfile.c</tt> + +<h2>Cancel changes and go back to previous revision</h2> + +<tt>fossil revert myfile.c</tt> + +Fossil does not prompt when reverting a file. It simply reminds the user about the +"undo" command, just in case the revert was a mistake. |
