Project

General

Profile

Development getting started » History » Version 17

Anonymous, 03/07/2013 07:36 PM

1 1 johu
h1. Getting started
2 1 johu
3 2 johu
{{toc}}
4 2 johu
5 16 johu
This guide guide describes how you get involved as new developer. If you only want to contribute patches you can checkout following guide about 
6 16 johu
[[development_git_patches|Git patches]]
7 9 johu
8 2 johu
h2. Redmine
9 2 johu
10 2 johu
No source code change without an issue. Quassel project manages bugs and features with the redmine plattform. To get open issue (bug or feature) assigned, you have to setup account here on http://bugs.quassel-irc.org. 
11 2 johu
12 2 johu
"register here":http://bugs.quassel-irc.org/account/register
13 2 johu
14 17 Anonymous
Please choose a nick identical or similar to your irc nick.
15 6 johu
16 2 johu
h2. Git
17 2 johu
18 10 johu
Install git on your operation system and configure it.
19 2 johu
20 2 johu
<pre>
21 2 johu
git config --global user.name "First name and last name"
22 2 johu
git config --global user.email registered@email.example.com
23 2 johu
</pre>
24 2 johu
25 8 johu
Optional you can switch colorful output on.
26 8 johu
27 8 johu
<pre>
28 13 MarcLandis
git config --global color.ui auto
29 8 johu
</pre>
30 2 johu
31 17 Anonymous
h2. Github
32 1 johu
h3. Setup account
33 2 johu
34 17 Anonymous
"register here":http://github.com
35 1 johu
36 17 Anonymous
Please choose a nick identical or similar to your irc nick.
37 2 johu
38 1 johu
h3. quassel clone
39 5 johu
40 17 Anonymous
Setup your personal clone of quassel. Fork the repository at http://github.com/quassel/quassel/
41 1 johu
42 11 johu
Switch to preferred directory for your projects like <code>/home/yournick/projects</code>. Now you can clone the personal quassel clone to local machine. 
43 7 johu
<pre>
44 17 Anonymous
git clone https://github.com/yournick/quassel.git
45 7 johu
</pre>
46 7 johu
47 2 johu
h3. ssh key
48 1 johu
49 1 johu
To push changes you will need a SSH key pair. To generate it on linux type the command:
50 2 johu
51 2 johu
<pre>
52 2 johu
ssh-keygen -t rsa
53 4 johu
</pre>
54 2 johu
55 17 Anonymous
For more details or if you're on Windows or OSX you can check the "github help":https://help.github.com/articles/generating-ssh-keys for more info.
56 1 johu
57 17 Anonymous
After following instructions, you should now have a private key like id_rsa and public key *id_rsa.pub* in your _~/.ssh/_. Upload the *public* key in your github account settings: https://github.com/settings/ssh
58 2 johu
59 2 johu
h3. ssh agent
60 2 johu
61 2 johu
_TODO_
62 2 johu
63 2 johu
h2. Workflow
64 2 johu
65 12 johu
h3. First step 
66 12 johu
67 12 johu
Get and issue to work on. If you have proper rights on redmine assign assign self, otherwise ask in irc to get it.
68 12 johu
69 12 johu
h3. Create branch
70 12 johu
71 12 johu
Remember do not work on master branch. Just create one branch for one.  
72 12 johu
73 12 johu
<pre>git branch branch_issue_x</pre>
74 12 johu
75 12 johu
h3. Switch to branch 
76 12 johu
77 12 johu
<pre>git checkout branch_issue_x</pre>
78 12 johu
79 12 johu
h3. Implementation
80 12 johu
81 12 johu
Work on this checkout - follow the normal development workflow...
82 12 johu
83 12 johu
h3. Commit
84 1 johu
 
85 12 johu
Commit changes to your local checkout 
86 12 johu
87 1 johu
<pre>git commit -a</pre>
88 1 johu
89 1 johu
Please try to merge all your commits to one.
90 1 johu
91 12 johu
_TODO EXAMPLE COMMAND_
92 12 johu
93 17 Anonymous
*Note*: If you add _fixes #issue-number_ to your commit message, redmine will close your issue with the issue number.
94 12 johu
95 12 johu
h3. Publish 
96 12 johu
97 17 Anonymous
To publish your changes just push it to github. -You will need running ssh-agent with your private ssh key as described above.-
98 12 johu
99 17 Anonymous
<pre>git push git@github.com:yournick/quassel.git branch_issue_x</pre>
100 12 johu
101 17 Anonymous
h3. Pull request
102 12 johu
103 17 Anonymous
To submit your changes just create a pull request on github by clicking on the 'Pull request' button that's shown in several places. Alternatively just go to https://github.com/yournick/quassel/pull/new/branch_issue_x
104 1 johu
105 12 johu
h3. Cleanup
106 12 johu
107 14 johu
If your merge request is applied, you can delete your branch.
108 14 johu
109 14 johu
* local branch
110 14 johu
<pre>git branch -D branch_issue_x</pre>
111 14 johu
112 14 johu
* remote branch
113 17 Anonymous
<pre>git push git@github.com:yournick/quassel.git :branch_issue_x</pre>
114 15 johu
115 15 johu
h3. Stay up to date
116 15 johu
117 15 johu
* Follow the main development branch by adding it as remote branch.
118 15 johu
119 17 Anonymous
<pre>git remote add upstream git://github.com/quassel/quassel.git</pre>
120 15 johu
121 15 johu
* Update by pulling from the remote.
122 15 johu
123 15 johu
<pre>git pull --rebase upstream master</pre>
124 15 johu
125 15 johu
Now you can push the changes to your remote as described.
126 15 johu
127 15 johu
*Note* You should only push these changes to your remote master. *Do not push other changes to your master.*