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:
- The first thing you’ve to do is get an account, you can do it by filling this form.
- 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
- 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:
- 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 email@example.com
- To get the kamoso source code you’ve to “clone” our repository, by doing:
- git clone git://gitorious.org/kamoso/mainline.git
- if you already have a clone, and you want update (svn up like)git pull
- 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:
- Clone the repository in gitorious.You can do it here by clicking on “Cloning this repository on gitorious”
- 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.
- A new subproject page will appear, which should look like “http://gitorious.org/~howtokamoso/kamoso/howtokamosos-clone”.
- We’ve to clone in local the push url, by executing:git clone firstname.lastname@example.org:~howtokamoso/kamoso/howtokamosos-clone.git
- 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
- When we’re done with our feature/fix, we have to publish (push it to gitorious)git push origin myNewBranch
- Finally, we’ve to do a “merge request” from the page of your subproject.
Example using the account “howtokamoso”:
ssh-keygen -t rsa
(Copy the output)
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 email@example.com:~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
And follow the easy form.