Download Fossil Version Control A Users Guide

Transcript
Fossil Version Control
2.2.4. Add and Initial Commit
I must now add all the relevant files into the repository with the add command. The Fossil add
is recursive so if I add the top level files it will automatically recurse into the subdirectories like
Layout and Research and get those files too. Before you do an add it pays to tidy up your directory
so you don’t accidentally add a bunch of transient files (like object files from a compile). It’s easy
to remove them later but a little tidying before hand can save you some work.
[Pandora-2:jschimpf/Public/FossilBook] jim% fossil add .
ADDED Layout/fossil.png
ADDED Research/History/CVS-grune.pdf
ADDED Research/History/RCS--A System for Version Control.webloc
ADDED Research/History/SCCS-Slideshow.pdf
ADDED Research/History/VCSHistory - pysync ....webloc
ADDED Research/fossilbib.bib
fossil: cannot add _FOSSIL_
ADDED fossilbook.lyx
ADDED outline.txt
Figure 2.3.: Initial file add
I simply told fossil to do an add of the current directory (.) so it got all those files and all the files
in the subdirectory. Note the _FOSSIL_ that it didn’t add. This is the tag file that fossil keeps in a
directory so it knows what repository it belongs to. Fossil won’t add this file since it manages it, but
everything else is fair game.
One final thing before I can quit for the day, these files have been added or rather they will be added
to the repository when I commit it. That must be done and then we can relax and let Fossil manage
things.
[Pandora-2:jschimpf/Public/FossilBook] jim% fossil commit -m "Initial Commit"
New_Version: 8fa070818679e1744374bc5302a621490276d739
Figure 2.4.: Initial Commit
I added a comment on the commit and it’s a good idea to always do this. When later we see the
timeline of the commits you will have notes to tell you what was done.
2.2.5. Fossil start up summary
• fossil new <name> Creates a new fossil repository
• fossil open <repository> While in a source directory connects this directory to the fossil
repository
• fossil add . Will add (recursively) all the files in the current directory and all subdirectories
to the repository
Updated for fossil version 1.25
Page 7 of 107