Last modified 6 years ago Last modified on 12/23/11 23:39:09
This is a draft !!||

Bcfg2 Git HOWTO

TracNav This is a draft document in progress, and is not official policy of the Bcfg2 project.

Git Resources



After installing git, identify yourself to git with your name and your email address.

$ git config --global "Your name"
$ git config --global ""

If you want to use a different email address for the Bcfg2 repository set it after the checkout in the repository directory with:

$ git config "Your name"
$ git config ""

Those entries are store in /path/to/repository/.git/config and can edited anytime. git can show you the content of the config file.

$ git config -l


You can checkout the source code with the following command:

The main repository:

$ git clone git://

The github mirror:

$ git clone


We assume that you have checked out the source and are in the repository directory. First step is to create a new branch.

$ git checkout -b new_plugin

Make changes, add new features, write a plugin, or fix typos. Commit every change to your new branch.

$ git add
$ git commit -m "Plugin xyz added"

Note that no changes are in the master branch at the moment. But git log knows everything about your local commit.

$ git log --pretty=oneline -3

If you are happy with the result, make the patch.

git format-patch master --stdout > new_plugin.patch

Be aware that your patches need to be BSD licensed for mainline inclusion.

Please send your patches to the Bcfg mailing list or open a ticket in the ticketing system.

Fork / Pull request

github provides tools for collaboration including a way to easy fork existing repositories. Go to the Bcfg2 github mirror and fork this repository. For more detail please refer to Forking a project. Clone the fork:

$ git clone

At the moment there is no connection to the upstream repository. You need to add another remote named "upstream" which points to the upstream repository.

$ cd bcfg2
$ git remote add upstream git://

Make changes, add new features, write a plugin, or fix typos. Then commit all changes.

$ git add new_file
$ git commit new_file -m "This is a new file"
$ git push origin master

If you are done, send a pull request.

Don't forget to pull-in changes from the upstream repository from time to time as described in the Forking a project document.

$ git fetch upstream
$ git merge upstream/master


Please visit the Git access page or mail the Bcfg mailing list for details about the application for direct git repository access.

$ git add edited_file
$ git commit -m "A little comment about the change"
$ git push origin master