From Git to Fossil
Recorded: Sept. 13, 2026, 3 a.m.
| Original | Summarized |
/home/lucio.albenga.es - From Git to Fossil /home/lucio.albenga.es 🇪🇸 ES | HOME | From Git to Fossil Published on People at Git has started to work on a proposal to make the Rust1 I'm old enough to have used (or tested) many version control systems: The options were to go back to one of the already known or look at It's made in C (although it uses some js and tcl for its web Taking all this into account, I decided to install Fossil and switch my Installing Fossil The first step is to install Fossil and it's quite likely that the sudo apt install fossil # Devuan GNU+Linux Once your package manager ends the installation you can check its fossil version The command above should return something like the following: This is fossil version 2.21 [3c53b6364e] 2023-02-26 19:24:24 UTC Importing Git repositories Fossil's documentation4 has the following example to export a Git cd repository I did it differently because I wanted to adjust some things to have mkdir ~/git-exported Now you can get into each Git repository folder and export it: cd repository Once you have exported all your Git repositories you should go fossil import --git \ The --rename-master trunk option renames your Git master branch as The --attribute "your@mail.com your_username" option changes the If you want to change more than one email address you can do it fossil import --git \ The output of the import command looks like the following: Rebuilding repository meta-data... If you look closely, the output gives you the repository Setting Up a Fossil Server Fossil has an embedded web server so you can take advantage of it to First you should create a folder to store the Fossil repositories on the server: mkdir /path/to/your/fossils Next copy your "fossils" to the folder on the server: scp *.fossil user@your_server:/path/to/your/fossils/ Now you can start the server with the following command: fossil server --port 8043 \ If you don't have a valid certificate you can use the follwing fossil server --port 8043 \ Once the server is running, if you put the following url If you lost your Fossil repository administrator's password, you can Go to the repositories folder in your server Open repository.fossil with Sqlite: sqlite3 repository.fossil Once inside sqlite execute the following query: select login,pw from user; The query above will return something like: your_user|My3w2jRxt1 The password is the value on the second column Exit Sqlite with the following command .quit Using Fossil Here is a very brief guide on how to start working with Fossil. Getting Help The help command is essential to see which commands are available and fossil --help Creating and cloning repositories These are similar to Git's but with differences. In Git it's usual that Creating a repository You can create a new repository with the command: fossil init repository.fossil This command will create only the repository, i.e. the file repository.fossil. mkdir my_working_folder You can also tell Fossil the name of the working folder and if it does not fossil open --workdir my_working_folder /path/to/repository.fossil Cloning a repository You can clone a repository using the command fossil clone followed by the fossil clone https://host/repository This command will automatically download the file repository.fossil fossil clone --no-open https://host/repository Once the repository is cloned, if you want to send your commits to the fossil remote https://user@host/repository The command above will asks you for your user's password and it will TIP: Because Fossil has this clear separation between the repository file Getting Info For getting the information about the working folder and repository status Viewing the timeline In Fossil the fossil time and fossil timeline commands are the fossil time --oneline # similar to git log --oneline Viewing changes in your working folder To see the changes in your working folder compared to the repository To see which files and folders are not under version control: fossil extras To see files that are under version control and have been modified: fossil changes To see a combination of the two previous commands: fossil changes --differ To see the working folder and repository status in a way more closely fossil status --differ Viewing the Diff(erences) To see the differences between the contents of our files in the working fossil diff To see the differences between a specific commit and the working folder: fossil diff --from 2c26dd6b69 # 2c26dd6b69 is the hashtag of the commit To see the differences between two specific commits: fossil diff --from 2c26dd6b69 --to cd086a1045 Fossil's diff command doesn't show colorized diffs. Check out Getting changes Fossil has an option called autosync that is enabled by default. This fossil update Otherwise it would be more similar to Git's. You have to do fossil pull Commiting changes As Fossil does not have the staging area, the commit is much more If you want to make a commit with all the pending changes: fossil commit The command above will open an editor for you to enter the commit fossil commit -m "My commit message" You can commit specific files with: fossil commit file1 file2 If you have the autosync option enabled, the commit command will also fossil push Adding and deleting files When you need to put new files under version control you can do it with: fossil add filename If you want to remove a file from the version control you can do it with: fossil delete filename By default the rm and delete commands do not physically delete the file There's also a command fossil addremove which adds to the repository all the Ignoring files Configuration is one of the points where there are several important cd working_folder/ Then edit it using glob patterns7: build/ Branches and Tags Git's paradigm encourages an intensive use of branches and tags but As I don't make much use of branches in my personal projects, I Fossil Check-Out Workflows Local web interface I don't want to finish this little Fossil guide without making it fossil ui Final Thoughts I like Fossil very much and, in my opinion, it's an almost perfect mix I think it's a great program that has a lot to offer, especially to Footnotes: 1 2 3 4 5 6 7 Website made and updated with Free/Libre Software. Checkout the changelog. Here there are no ads, no cookies and your data is not collected in any way ::Member of:: +---------------------------+--+ +--------------------------------+ |
The author initiated a consideration for switching away from the Git version control system, partly due to dissatisfaction with the Rust community's focus and perceived dogmatic approaches to project development. Having experience with various version control systems, the author explored alternatives, ultimately choosing Fossil based on its structural and operational features. Fossil was selected because it is implemented in C, making it a small and efficient program that consumes minimal hardware resources. Furthermore, Fossil offers a simpler interface compared to Git, lacking "overkill" functionalities like a staging area which the author deemed unnecessary for their personal projects. A key advantage of Fossil is its capability to facilitate quick and easy self-hosting, as it includes a built-in web server and interface for version control views, wikis, and tickets, eliminating the need for external dependencies like GitLab or Gitea. Additionally, Fossil handles commit authorship by using usernames instead of email addresses, mitigating issues related to email spam in public repositories. Fossil demonstrates interoperability with Git, supporting the ability to revert to Git if necessary and handling two-way synchronization with Git3 repositories, which is relevant for managing GitHub mirrors. The process of migration from Git to Fossil involved exporting existing Git repositories using git fast-export and then importing them into Fossil using fossil import. This required careful handling of repository metadata, specifically renaming the master branch to trunk and modifying commit author attributes to map Git email addresses to usernames within the Fossil system. The import process provides administrative credentials for the new Fossil repository, which are necessary for later configuration. To utilize Fossil effectively, a self-hosted server setup can be established by leveraging its embedded web server. This involves copying the Fossil repository files to a server directory and then starting the server with specific command arguments defining the port, certificates, and the repository list. Access to the repositories is managed via a web interface, which requires administrative login details. Password recovery for the repository administrator can be achieved by interacting with the underlying SQLite database to retrieve the stored credentials. Fossil provides a distinct approach to repository management and interaction compared to Git. While similar commands exist, Fossil operates with a clear separation between the repository file and the working folder. Repositories are initialized with fossil init, which creates the repository file, followed by opening it within a working directory structure using fossil open. Cloning repositories uses fossil clone, which downloads the repository file and creates a corresponding working folder. Changes are tracked using commands like fossil time, which serves as an equivalent to git log, and fossil diff, which allows for comparing file contents between the working folder and specific commits or between two commits. For managing changes, Fossil employs commands like fossil commit, which can handle committing all pending changes or specific files, and fossil push to synchronize with a remote server. File additions and removals are managed through specific commands like fossil add filename, fossil delete filename, or the combined fossil addremove command, which handles adding or removing files based on their status in the working directory. Ignoring files is managed through a configuration file within the working folder, utilizing glob patterns to specify files and directories to exclude from version control. Furthermore, Fossil supports concepts of branching and tagging, though the author recommends consulting the Fossil Wiki for details regarding its specific workflows, as these differ from Git's paradigm. An optional local web interface can be accessed directly from the working folder using the fossil ui command, allowing interaction without a dedicated server running. Ultimately, the author views Fossil as a beneficial hybrid, balancing the centralized nature of systems like Subversion with the distributed nature of Git, positioning it as a simple and effective alternative, particularly appealing to independent programmers and those focused on self-hosting solutions. |