Development git patches » History » Version 14

Version 13 (al, 08/27/2010 01:50 PM) → Version 14/15 (johu, 09/09/2010 01:55 AM)

h1. Git Patches


h2. About these instructions

There are two sets of instructions here; one for first-time setup, one for already existing setups.

h2. First-time setup

1. Create a git copy of the master from gitorious
<pre>$ git clone git://</pre> git://</pre>

2. Change into your new copy of the git repository
<pre>$ cd quassel</pre>

3. Set your personal preferences
<pre>$ git config --global "Your full name here"
$ git config --global ""</pre>

4. At this point you have your very own working copy of the central git repository which you can make changes to.
<pre>$ ls
AUTHORS CMakeLists.txt dev-notes gpl-2.0.txt INSTALL po src
ChangeLog COPYING doc gpl-3.0.txt interfaces README
cmake data Doxyfile icons pics scripts</pre>

When you have edited the file(s), you should follow the steps in the "Existing setups" below to create the git patch file(s).

h2. Existing setups

Here, I assume you have either followed the instructions above, or already have a git repository clone from the master.
Also, I expect that you are inside the local 'quassel' repository as per 3. in the "First-time setup" above.

1. If you want to keep your local repository up to date with the central one, you just need to synchronize
<pre>$ git pull --rebase</pre>

2. After you have done your changes to the file for bug fixing, you can check that the changes are recorded by git
(all your changes will be shown, press <space> to move one page further, and <q> to stop showing the differences/changes)
<pre>$ git status</pre><pre>$ git diff</pre>

3. Then it's time to add your changes to the local index (change <path-to-file> with complete path to your changed file)
<pre>$ git add <path-to-file></pre>

4. You then commit the changes you have done (which will give some feedback like the one I've provided below)
(You should change the "Fixed some small inconsistencies" text with some short description of your changes)
<pre>$ git commit -m "Fixed some small inconsistencies."
[master edc8b8a] Fixed some small inconsistencies.
1 files changed, 8 insertions(+), 9 deletions(-)</pre>

5. You can now check the status of you git repository (which will give some feedback like the one I've provided below)
<pre>$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
nothing to commit (working directory clean)</pre>

6. You then create the actual patch-file (note that the name of the file is the description provided in 4. above)
<pre>$ git format-patch origin/master

7. Congratulations! :-)
This file is now ready and you attach to the bug issue or send it to a developer via mail e.g. devel _at_