h1

HowTo contribute guide #1 (contributing code)

October 7, 2009

Hi there!

In the past weeks we’ve received a good amount of feedback from our users, as well of different developers interested in join into the project, we’ve to admit that we’re a bit overloaded because now we’ve to write code plus manage user/developer request, which is something new for us. In an attempt to improve the situation we are going to setup the common needed tools to manage the typical community needs.

The first “item?” of this tools is the “Code contribution guide”, which explain how to send patches no matter the size of those.

Howto contribution guide #1 (code contribution):

In Kamoso we’re using the distributed version control system git hosted on gitorious which is a social community designed to make easy contribute in any project hosted there.

Setting up a gitorious account:

  1. The first thing you’ve to do is get an account, you can do it by filling this form.
  2. Once you’ve an account, you’ve to add an ssh key into your account. You can to that in https://secure.gitorious.org/~howtokamoso/keys (replace howtokamoso by your username).You can generate an ssh account by executing “ssh-keygen -t rsa”, which will save the needed text to be copied in ~/.ssh/id_rsa.pub
  3. Now that we’re ready on gitorious, we can browse the Kamoso project at http://www.gitorious.org/kamoso

Playing with Kamoso project: getting the code and generate a patch:

  1. You should have your git configured with your name/email, You can do it by executing:git config –global user.name “Your Legal First and Last Name Here”git config –global user.email you@yourdomain.example.com
  2. To get the kamoso source code you’ve to “clone” our repository, by doing:
  3. git clone git://gitorious.org/kamoso/mainline.git
  4. if you already have a clone, and you want update (svn up like)git pull
  5. Finally, once you’ve your modifications ready, you only have to execute “git-diff” to generate a patch.

Using the power of gitorious:

Gitorious offers to us an easy way of manage contributions, and offer to the external developer a way of work as if it were internal. This is the workflow to follow:

  1. Clone the repository in gitorious.You can do it here by clicking on “Cloning this repository on gitorious”
  2. Now, a new “subproject” of kamoso will be created. In this project you’re the administrator and you decide who can push changes for example.
  3. A new subproject page will appear, which should look like “http://gitorious.org/~howtokamoso/kamoso/howtokamosos-clone”.
  4. We’ve to clone in local the push url, by executing:git clone git@gitorious.org:~howtokamoso/kamoso/howtokamosos-clone.git
  5. Is recommendable to create one branch for each feature/fix we want to do. You can do it by executing:git branch myNewBranchand then, switch to itgit checkout myNewBranch
  6. When we’re done with our feature/fix, we have to publish (push it to gitorious)git push origin myNewBranch
  7. Finally, we’ve to do a “merge request” from the page of your subproject.

Example using the account “howtokamoso”:

ssh-keygen -t rsa

cat ~./ssh/id_rsa.pub

(Copy the output)

Go to: https://secure.gitorious.org/~howtokamoso/keys/new

Paste the id_rsa.pub content.

Go to: http://gitorious.org/kamoso/mainline and click on “Clone this repository on gitorious”

(Fill the form)

git clone git@gitorious.org:~howtokamoso/kamoso/howtokamosos-clone.git

git branch AUTHORS_fix

git checkout AUTHORS_fix

“Now make the changes you want to”

git commit -a -m “Removed a \n from the top of the file”

git push origin AUTHORS_fix

Go to:

http://gitorious.org/kamoso/howtokamosos-clone/merge_requests/new

And follow the easy form.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: