Fossil has a shunning mechanism, which I believe may be used to keep certain files from version control.
I have a directory named R
, which I wish to control except for a sub-directory inside of it, named library
, which I wish to exclude. How can I "shun" the sub-directory?
My usual workflow is something like this:
fossil new ../fossils/R.fsl
fossil open ../fossils/R.fsl
fossil add .
fossil ci -m "a commit"
fossil close R.fsl
The help page is here, but I still couldn't figure it out:
http://www.fossil-scm.org/index.html/doc/trunk/www/shunning.wiki
If I read your question correctly, you're looking for a way to keep specific files out of version control.
In that case, you're probably looking for the ignore-glob
setting.
That setting allows you to specify (chunks of) paths that should be left out of the repository.
For example, if you wanted to leave all files in the subdirectory skip
, and you also wanted to keep all *.bak
files everywhere out of your repo, you could achieve this with the following command:
fossil set ignore-glob "skip/,*.bak"
The fossil set ignore-glob
takes a comma-separated list, so this means any file starting with skip/
will be ignored, and all files matching the *.bak
glob will be ignored as well.
If you want to test your ignore-glob
setting first (it can be a tad tricky to get right, in my experience), you can test it using the extras command. fossil extras
will normally show all files present in the working folder (and its subfolders), but are not in the repository. You can override the ignore-glob
setting using the --override
command-line switch; thereby allowing you to test it. If it works OK, you can save that ignore-glob with the settings
command, as described above.
Do NOT use shun for this!
As the documentation clearly says, shunning is not recommended. It should only be used with great care, and only if you understand exactly what it does, because you can seriously fuck up your repository if you use it the wrong way. Your question makes it clear that you don't understand its use, so I strongly suggest forgetting about shun until you're more familiar with the working of Fossil.