<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged fossil</title>
<link>https://coderlegion.com/tag/fossil</link>
<description>Powered by Question2Answer</description>
<item>
<title>DevLog 20250927: Use Fossil as Binary Asset VCS</title>
<link>https://coderlegion.com/6593/devlog-20250927-use-fossil-as-binary-asset-vcs</link>
<description>&lt;blockquote&gt;&lt;p&gt;It's clean and elegant.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;overview&quot;&gt;Overview&lt;/h3&gt;
&lt;p&gt;As discussed in a &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/4483/devlog-20250806-change-version-file-changes-history-only-version-control-binary-assets?show=6524#a6524&quot;&gt;previous post&lt;/a&gt; about binary file version control, keeping binaries well-versioned has always been challenging.&lt;/p&gt;
&lt;p&gt;Years ago, when I first discovered SQLite, I also found Fossil. At that time, it didn't meet my needs - Git proved far better for collaboration and text-based workflows (especially with GitHub and GitHub Desktop).&lt;/p&gt;
&lt;p&gt;However, Fossil may perform better for binary files under ~2GB, provided some manual bookkeeping and syncing.&lt;/p&gt;
&lt;p&gt;Beyond versioning, Fossil offers several useful built-in tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/chat.md&quot;&gt;Chatroom&lt;/a&gt;: Configurable 7-day ephemeral chat for authorized users. Supports &lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/help?name=/chat-poll&quot;&gt;HTTP API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/wikitheory.wiki&quot;&gt;Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/embeddeddoc.wiki&quot;&gt;Embedded Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/event.wiki&quot;&gt;Tech Notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/webui.wiki&quot;&gt;Web UI Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Direct file views: HEX, Text, Download&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/forum.wiki&quot;&gt;Forum&lt;/a&gt;: Permanent records; CDN support for images&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/bugtheory.wiki&quot;&gt;Bug Tracking / Tickets / Issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/tip/www/webui.wiki&quot;&gt;Full-text search&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;framework&quot;&gt;Framework&lt;/h3&gt;
&lt;p&gt;This framework describes how I'm beginning to &lt;strong&gt;use Fossil alongside Git&lt;/strong&gt; for version control.&lt;/p&gt;
&lt;h4 id=&quot;using-fossil-git&quot;&gt;Using Fossil + Git&lt;/h4&gt;
&lt;p&gt;The plan is simple: Use git for text files; fossil for binary assets.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Create repo
cd &quot;&amp;lt;Repo Folder&amp;gt;&quot;
fossil init ../MyRepo.fossil    # The convention is to create fossil repository outside the repo folder
fossil open -k ../MyRepo.fossil # Creates the _FOSSIL_ tracking file; -k skips checkout

# Create fossil-settings (See commit message below)
mkdir -p .fossil-settings
printf &quot;.git\n.git/*\n.gitignore\n&quot; &amp;gt; .fossil-settings/ignore-glob
fossil add .fossil-settings
fossil commit -m &quot;Add Fossil ignore rules for Git files&quot;

# Manually ignore files already tracked by Git, then commit again if needed
# fossil changes
# fossil commit -m &quot;Update ignore file&quot;

# In Git (e.g. via GitHub Desktop), ignore Fossil's contents, especially:
# *.fossil
# _FOSSIL_

# Treat all files as binary
printf &quot;*&quot; &amp;gt; .fossil-settings/binary-glob
fossil add .fossil-settings/binary-glob
fossil commit -m &quot;Treat all files as binary in Fossil&quot;

# Inspect
# fossil changes
# fossil extras

fossil add .
fossil commit -m &quot;Initial Fossil import alongside Git&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This setup cannot keep Fossil and Git perfectly synchronized. Manual bookkeeping is necessary to restore past states accurately.&lt;/p&gt;
&lt;h4 id=&quot;summary&quot;&gt;Summary&lt;/h4&gt;
&lt;p&gt;Key conventions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep the &lt;code&gt;.fossil&lt;/code&gt; file outside the Git repo folder.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.fossil-settings/binary-glob&lt;/code&gt;: mark all files as binary.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.fossil-settings/ignore-glob&lt;/code&gt;: define ignore patterns.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_FOSSIL_&lt;/code&gt; and &lt;code&gt;.fossil-settings&lt;/code&gt; can be deleted safely.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;quick-reference&quot;&gt;Quick Reference&lt;/h4&gt;
&lt;p&gt;Common commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fossil init &amp;lt;Repo&amp;gt; [--project-name &amp;lt;Name&amp;gt;]&lt;/code&gt;  -  create repo; edit name later in UI if omitted&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil add .&lt;/code&gt;  -  add all&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil add &amp;lt;File&amp;gt;&lt;/code&gt;  -  add file&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil rm &amp;lt;File&amp;gt;&lt;/code&gt;  -  remove file&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil commit -m &amp;lt;Message&amp;gt;&lt;/code&gt;  -  commit all local changes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil commit file1.c file2.h -m &amp;lt;Message&amp;gt;&lt;/code&gt;  -  commit specific files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil open --keep &amp;lt;DB&amp;gt;&lt;/code&gt;  -  open repo without checkout&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil open --force &amp;lt;DB&amp;gt;&lt;/code&gt;  -  open repo, overwrite with latest&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil status&lt;/code&gt; or &lt;code&gt;fossil info&lt;/code&gt;  -  show repo info&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil changes&lt;/code&gt;  -  list modified tracked files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil extras&lt;/code&gt;  -  list untracked files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil diff&lt;/code&gt;  -  show content changes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil timeline&lt;/code&gt;  -  history view&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil ui [&amp;lt;Repo&amp;gt;]&lt;/code&gt;  -  launch web UI&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fossil server [&amp;lt;Repo&amp;gt;]&lt;/code&gt;  -  start web server for &lt;code&gt;push&lt;/code&gt;/&lt;code&gt;pull&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The typical &lt;code&gt;git status&lt;/code&gt; is achieved with &lt;code&gt;fossil changes&lt;/code&gt; + &lt;code&gt;fossil extras&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;recipes&quot;&gt;Recipes&lt;/h3&gt;
&lt;h4 id=&quot;ignore-blender-versioning-files&quot;&gt;Ignore Blender versioning files&lt;/h4&gt;
&lt;p&gt;Use this pattern:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;*.blend[0-9]*
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;importing-git-repos&quot;&gt;Importing Git Repos&lt;/h4&gt;
&lt;p&gt;Not required here, but reference: &lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/trunk/www/inout.wiki&quot;&gt;https://fossil-scm.org/home/doc/trunk/www/inout.wiki&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;stashing-and-committing-specific-files&quot;&gt;Stashing and Committing Specific Files&lt;/h4&gt;
&lt;p&gt;Fossil lacks Git's staging (&lt;code&gt;git add -p&lt;/code&gt;) feature. The checkout directory is treated as one working tree snapshot. Still, you can commit selectively.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Commit specific files&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can pass the filenames explicitly to &lt;code&gt;fossil commit&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;fossil commit file1.c file2.h
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will commit only the listed files, even if you changed other files in the checkout. The other modified files will stay uncommitted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use stash to isolate changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want to set aside changes temporarily:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stash away all changes: &lt;code&gt;fossil stash&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reapply only the files you want: &lt;code&gt;fossil stash pop file1.c file2.h&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit those files: &lt;code&gt;fossil commit file1.c file2.h&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Optionally reapply remaining changes: &lt;code&gt;fossil stash pop&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Revert unwanted files&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you've edited several files but only want to commit some:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;fossil revert fileX.c fileY.c
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This discards edits to those files, leaving only the desired ones for commit. Use stash first if you want to preserve them.&lt;/p&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;
&lt;p&gt;Learn Fossil quickly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://fossil-scm.org/home/doc/trunk/www/quickstart.wiki&quot;&gt;Quickstart Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>CI/CD Pipelines</category>
<guid isPermaLink="true">https://coderlegion.com/6593/devlog-20250927-use-fossil-as-binary-asset-vcs</guid>
<pubDate>Fri, 17 Oct 2025 14:50:27 +0000</pubDate>
</item>
</channel>
</rss>