Git Usage

Please note that if you are familiar with SVN, Git is similar, (and better), but there can be a few surprising differences that can be very confusing (nothing worse than converting from CVS to SVN).

The main Bacula Git repo contains the subdirectories bacula, gui, and regress. With Git it is not possible to pull only a single directory, because of the hash code nature of Git, you must take all or nothing.

For developers, the most important thing to remember about Git and the Source Forge repository is not to "force" a push to the repository. Doing so, can possibly rewrite the Git repository history and cause a lot of problems for the project.

You can get a full copy of the Source Forge Bacula Git repository with the following command:

git clone git:// trunk

This will put a read-only copy into the directory trunk in your current directory, and trunk will contain the subdirectories: bacula, gui, and regress. Obviously you can use any name an not just trunk. In fact, once you have the repository in say trunk, you can copy the whole directory to another place and have a fully functional git repository.

If you have write permission to the Source Forge repository, you can get a copy of the Git repo with:

git clone ssh://<userid> trunk

where you replace <userid> with your Source Forge login userid, and you must have previously uploaded your public ssh key to Source Forge.

The above command needs to be done only once. Thereafter, you can:

cd trunk
git pull     # refresh my repo with the latest code

As of August 2009, the size of the repository (trunk in the above example) will be approximately 55 Megabytes. However, if you build from source in this directory and do a lot of updates and regression testing, the directory could become several hundred megabytes.

Learning Git

If you want to learn more about Git, we recommend that you visit:

Some of the differences between Git and SVN are:

Kern Sibbald 2010-08-30