Fossil Cheat Sheet
Sync wiki and *.md files
Listing all the wiki pages,
$ fossil wiki list --all
Viewing contents on the stdout,
$ fossil wiki export <page_name> -
Export to a file for local edits
$ fossil wiki export <page_name> local_edit.md
Append back into the fossil-scm
$ fossil commit <page_name> local_edit.md
To reflect only the wiki changes before any commit,
$ fossil sync
To add local markdown *.md into fossil wiki,
$ fossil wiki create <wiki_name> local.md -M text/x-markdown
Actual usecase of syncing REAMDE.md files
$ mkdir RAMSES-code
$ vim RAMSES-code/README.md # do the edits here, fossil will auto read in web ui.
$ fossil add RAMSES-code/REAMDE.md
Sync this RAMSES-code/REAMDE.md as the RAMSES-code.wiki
$ fossil wiki create RAMSES-code-intro RAMSES-code/README.md
$ fossil wiki ls # entry should be visible here.
Commit all the changes now in the newer branch.
$ fossil commit -m "Created new branch, README and corresponding wiki files" --branch RAMSES-code
Suppose if you happen to edit the RAMSES-code/README.md and want that reflect
the wiki page as well
$ vim RAMSES-code/README.md # Secondary edits.
$ fossil status # Check the changes are tracked in the corresponding
# branch. (extra line after 'comment')
# Following updates the corresponding wiki
$ fossil wiki commit RAMSES-code-intro RAMSES-code/README.md
$ fossil wiki export RAMSES-code-intro -
# Above should show the updated wiki
Proceed to commit and push to the remote location, if everything is okay.
$ fossil commit -m "RAMSES wiki and README"
Both wiki pages and web ui under RAMSES-code/ should be synced now.
Final Merge into trunk
$ fossil update trunk # Change to trunk branch.
$ fossil status # Tags should reflect 'trunk'
$ fossil merge RAMSES-code # Merge the branch into main 'trunk'
$ fossil commit -m "Clean merge."