wiki:Bcfg2GitHowto

Version 1 (modified by http://fab.id.fedoraproject.org/, 13 years ago) (diff)

--

This is a draft !!||

Bcfg2 Git HOWTO

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

Git Resources

Repositories

Configuration

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

$ git config --global user.name "Your name"
$ git config --global user.email "[email protected]"

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 user.name "Your name"
$ git config user.email "[email protected]"

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

Checkout

You can checkout the source code with the following command:

The main repository:

$ git clone git://git.mcs.anl.gov/bcfg2.git

The github mirror:

$ git clone https://github.com/solj/bcfg2.git

Patches

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 new_plugin.py
$ 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.

Commit

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