Project

General

Profile

Development getting started » History » Version 16

johu, 09/03/2010 10:59 AM
update link to git patches

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 6 johu
Please choose a nick is 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 8 johu
31 2 johu
h2. Gitorious
32 2 johu
33 2 johu
h3. Setup account
34 2 johu
35 2 johu
"register here":http://gitorious.org/users/new
36 6 johu
37 6 johu
Please choose a nick is identical or similar to your irc nick.
38 2 johu
39 5 johu
h3. quassel clone
40 5 johu
41 7 johu
Setup your personal clone of quassel. Go to http://gitorious.org/quassel/quassel/clone and choose a name like yournicks-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 7 johu
git clone git://gitorious.org/~yournick/quassel/yournicks-quassel.git
46 7 johu
</pre>
47 7 johu
48 2 johu
h3. ssh key
49 2 johu
50 2 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 1 johu
On Windows you can check the "official faq":http://gitorious.org/about/faq for a solution.
57 1 johu
58 7 johu
After following instructions, you should now have a private key like id_dsa and public key *id_dsa.pub* in your _~/.ssh/_. Upload the public key in your gitorious account options. http://gitorious.org/~yournick/keys/new
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 12 johu
 
86 12 johu
Commit changes to your local checkout 
87 12 johu
88 12 johu
<pre>git commit -a</pre>
89 12 johu
90 12 johu
Please try to merge all your commits to one.
91 12 johu
92 12 johu
_TODO EXAMPLE COMMAND_
93 12 johu
94 12 johu
*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 12 johu
To publish your changes just push it to gitorious. You will need running ssh-agent with your private ssh key as described above.
99 12 johu
100 12 johu
<pre>git push git@gitorious.org:~yournick/quassel/yournicks-quassel.git branch_issue_x</pre>
101 12 johu
102 12 johu
h3. Merge request
103 12 johu
104 12 johu
To submit your changes just create a merge request on gitorious by going to your clone page and selecting *Request merge* in the menu.
105 12 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 14 johu
<pre>git push git@gitorious.org:~yournick/quassel/yournicks-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 15 johu
<pre>git remote add upstream git://gitorious.org/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.*