| 1 | == How to contribute code == |
| 2 | Since most of Telldus code is released as Open Source it is not only possible for everyone to read the code, but everone can contribute with updates, and we encourage you to do so. |
| 3 | |
| 4 | To ease up the development we are using git for the code and mirror it on two of the bigger git hosting sites; Gitorious and GitHub. |
| 5 | |
| 6 | Why having the code in three places?[[BR]] |
| 7 | We belive it should be easy to help out. Some prefer one platform over the other. By offering the code on multiple places you can contribute from the platform you prefer. |
| 8 | |
| 9 | New to Git?[[BR]] |
| 10 | There is some great guides available on the internet. One we like is http://progit.org/book/ |
| 11 | |
| 12 | === Telldus repository === |
| 13 | Our main repository is hosted for anonymous access here: |
| 14 | http://git.telldus.com/telldus.git |
| 15 | |
| 16 | For small updates this repository is probably the easiest way to get started. |
| 17 | Check out the code using the following command:[[BR]] |
| 18 | {{{ |
| 19 | $ git clone http://git.telldus.com/telldus.git |
| 20 | }}} |
| 21 | |
| 22 | Change some files and commit them back to your clone:[[BR]] |
| 23 | {{{ |
| 24 | $ git add a-changed-file |
| 25 | $ git commit -m "Changed the file a-changed-file" |
| 26 | }}} |
| 27 | |
| 28 | For sending patches to us you can create patch-files using the format-patch command. |
| 29 | {{{ |
| 30 | $ git format-patch origin/master |
| 31 | }}} |
| 32 | This command creates one or many numbered *.patch files, one for each commit. In this case only one file named {{{0001-Changed-the-file-a-changed-file.patch}}} |
| 33 | |
| 34 | Create a ticket, describing the change, and attach the patchfiles you have for the bug/feature. |
| 35 | |
| 36 | === Gitorious/GitHub === |
| 37 | |
| 38 | The workflow for both Gitorious and GitHub is quite similar. This is suitable if you plan on contributing more than once or twice. |
| 39 | |
| 40 | You need to have a user account on one of the sites first. You can then fork our repository, creating your own, before cloning the repository. |
| 41 | |
| 42 | Our Gitorious repository is available here https://www.gitorious.org/telldus/telldus and for GitHub here: https://github.com/telldus/telldus |
| 43 | |
| 44 | When you have changed some files and commited them you can push them back to Gitorious/GitHub. When you are ready to contribute back to Telldus, use the "Pull request feature" and we will be alerted of your changes. |