Project

General

Profile

Development getting started » History » Version 18

Anonymous, 03/07/2013 07:37 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 18 Anonymous
33 1 johu
h3. Setup account
34 2 johu
35 17 Anonymous
"register here":http://github.com
36 1 johu
37 17 Anonymous
Please choose a nick identical or similar to your irc nick.
38 2 johu
39 1 johu
h3. quassel clone
40 5 johu
41 17 Anonymous
Setup your personal clone of quassel. Fork the repository at http://github.com/quassel/quassel/
42 1 johu
43 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. 
44 7 johu
<pre>
45 17 Anonymous
git clone https://github.com/yournick/quassel.git
46 7 johu
</pre>
47 7 johu
48 2 johu
h3. ssh key
49 1 johu
50 1 johu
To push changes you will need a SSH key pair. To generate it on linux type the command:
51 2 johu
52 2 johu
<pre>
53 2 johu
ssh-keygen -t rsa
54 4 johu
</pre>
55 2 johu
56 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.
57 1 johu
58 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
59 2 johu
60 2 johu
h3. ssh agent
61 2 johu
62 2 johu
_TODO_
63 2 johu
64 2 johu
h2. Workflow
65 2 johu
66 12 johu
h3. First step 
67 12 johu
68 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.
69 12 johu
70 12 johu
h3. Create branch
71 12 johu
72 12 johu
Remember do not work on master branch. Just create one branch for one.  
73 12 johu
74 12 johu
<pre>git branch branch_issue_x</pre>
75 12 johu
76 12 johu
h3. Switch to branch 
77 12 johu
78 12 johu
<pre>git checkout branch_issue_x</pre>
79 12 johu
80 12 johu
h3. Implementation
81 12 johu
82 12 johu
Work on this checkout - follow the normal development workflow...
83 12 johu
84 12 johu
h3. Commit
85 1 johu
 
86 12 johu
Commit changes to your local checkout 
87 12 johu
88 1 johu
<pre>git commit -a</pre>
89 1 johu
90 1 johu
Please try to merge all your commits to one.
91 1 johu
92 12 johu
_TODO EXAMPLE COMMAND_
93 12 johu
94 17 Anonymous
*Note*: If you add _fixes #issue-number_ to your commit message, redmine will close your issue with the issue number.
95 12 johu
96 12 johu
h3. Publish 
97 12 johu
98 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.-
99 12 johu
100 17 Anonymous
<pre>git push git@github.com:yournick/quassel.git branch_issue_x</pre>
101 12 johu
102 17 Anonymous
h3. Pull request
103 12 johu
104 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
105 1 johu
106 12 johu
h3. Cleanup
107 12 johu
108 14 johu
If your merge request is applied, you can delete your branch.
109 14 johu
110 14 johu
* local branch
111 14 johu
<pre>git branch -D branch_issue_x</pre>
112 14 johu
113 14 johu
* remote branch
114 17 Anonymous
<pre>git push git@github.com:yournick/quassel.git :branch_issue_x</pre>
115 15 johu
116 15 johu
h3. Stay up to date
117 15 johu
118 15 johu
* Follow the main development branch by adding it as remote branch.
119 15 johu
120 17 Anonymous
<pre>git remote add upstream git://github.com/quassel/quassel.git</pre>
121 15 johu
122 15 johu
* Update by pulling from the remote.
123 15 johu
124 15 johu
<pre>git pull --rebase upstream master</pre>
125 15 johu
126 15 johu
Now you can push the changes to your remote as described.
127 15 johu
128 15 johu
*Note* You should only push these changes to your remote master. *Do not push other changes to your master.*