Changes between Initial Version and Version 1 of Bcfg2GitHowto


Ignore:
Timestamp:
11/10/10 03:31:11 (12 years ago)
Author:
http://fab.id.fedoraproject.org/
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Bcfg2GitHowto

    v1 v1  
     1||This is a draft !!!|| 
     2 
     3= Bcfg2 Git HOWTO = 
     4This is a draft document in progress, and is not official policy of the Bcfg2 project. 
     5 
     6== Git Resources == 
     7 * The [http://git-scm.com/ project page] of git provides documentation and more. 
     8 * A [http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html git tutorial] 
     9 * [http://git-scm.com/course/svn.html Git-SVN Crash Course] for  
     10 * [http://img705.imageshack.us/img705/2267/gitcheatsheet.png Git Cheat Sheet], [https://github.com/AlexZeitler/gitcheatsheet Git Cheat Sheet], [[http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html Git Cheat Sheet]  Git Cheat Sheet] , and [http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html Git Cheat Sheet]  
     11 
     12== Repositories == 
     13 
     14 * [http://git.mcs.anl.gov/bcfg2.git/ git.mcs.anl.gov:bcfg2.git] is the main upstream repository 
     15 * [https://github.com/solj/bcfg2 git://github.com/solj/bcfg2.git] is a [https://github.com/ github] mirror that people can use to send pull requests 
     16 
     17== Configuration == 
     18 
     19After installing git, identify yourself to git with your name and your email address. 
     20{{{ 
     21$ git config --global user.name "Your name" 
     22$ git config --global user.email "[email protected]" 
     23}}} 
     24 
     25If you want to use a different email address for the Bcfg2 repository set it after the checkout in the repository directory with: 
     26 
     27{{{ 
     28$ git config user.name "Your name" 
     29$ git config user.email "[email protected]" 
     30}}} 
     31 
     32Those entries are store in `/path/to/repository/.git/config` and can edited anytime. git can show you the content of the `config` file. 
     33 
     34{{{ 
     35$ git config -l 
     36}}} 
     37 
     38== Checkout == 
     39You can checkout the source code with the following command: 
     40 
     41The main repository: 
     42 
     43{{{ 
     44$ git clone git://git.mcs.anl.gov/bcfg2.git 
     45}}} 
     46 
     47The github mirror: 
     48 
     49{{{ 
     50$ git clone https://github.com/solj/bcfg2.git 
     51}}} 
     52 
     53== Patches == 
     54We assume that you have checked out the source and are in the repository directory. First step is to create a new branch. 
     55 
     56{{{ 
     57$ git checkout -b new_plugin 
     58}}} 
     59 
     60Make changes, add new features, write a plugin, or fix typos. Commit every change to your new branch.   
     61 
     62{{{ 
     63$ git add new_plugin.py 
     64$ git commit -m "Plugin xyz added" 
     65}}} 
     66 
     67Note that no changes are in the `master` branch at the moment. But `git log` knows everything about your local commit. 
     68 
     69{{{ 
     70$ git log --pretty=oneline -3 
     71}}} 
     72 
     73If you are happy with the result, make the patch. 
     74 
     75{{{ 
     76git format-patch master --stdout > new_plugin.patch 
     77}}} 
     78 
     79Be aware that your patches need to be BSD licensed for mainline inclusion.  
     80 
     81Please send your patches to the [wiki:MailingList Bcfg mailing list] or open a ticket in the [http://trac.mcs.anl.gov/projects/bcfg2/newticket ticketing system]. 
     82 
     83== Commit == 
     84Please visit the [wiki:GitAccess Git access] page or mail the [wiki:MailingList Bcfg mailing list] for details about the application for direct git repository access. 
     85 
     86{{{ 
     87$ git add edited_file 
     88$ git commit -m "A little comment about the change" 
     89$ git push origin master 
     90}}} 
     91