Note that these notes are targeted at the CenterIM4 development. They were not yet updated to reflect CenterIM5 changes.
The CenterIM git repository has a branch called mob which may be changed by anyone using the user mob without requiring any authentication. This means that the branch is effectively world-writable and you can use it to commit changes without asking anyone for permission.
- 1 1. Getting the Code
- 2 2. Changing the files
- 3 3. Preparing to commit changes to the server
- 4 4. Upload changes to server
- 5 5. Inform the developers
- 6 Other useful GIT stuff
- 7 Documentation
1. Getting the Code
Clone the CenterIM git repository using mob as user name. The mob user doesn't require any password.
The RSA key fingerprint can be found on the write-protected side Security codes
git clone git+ssh://email@example.com:22/srv/git/centerim.git
Enter the directory and create a new local branch mob tracking the remote mob branch.
cd centerim && git checkout -b mob origin/mob
Make sure it builds BEFORE you make any changes. It always makes sense to have a baseline for the sake of sanity.
./autogen.sh && ./configure && make
2. Changing the files
Now you can make changes to the files locally.
Test your patch:
makeand CenterIM itself and make sure you did not introduce other bugs!
- Optionally, run
git diffto see what you modified, run
git checkout <filename>to revert your changes
- If everything works fine and when you're satisfied, proceed to the next step.
3. Preparing to commit changes to the server
Step 1: Identify
To make sure that your commits have your name and email address, create the file
[user] name = "Your Name" email = "firstname.lastname@example.org"
Step 2: Commit your changes locally
On the command line
First review what files you have changed.
Add the files you want to commit
git add <filename> #To add one file git add -u #To add all the files changed locally (visible with 'git status')
Then create the commit itself. This launches a text editor to allow you to enter a commit message. Please try to describe what your patch changes exactly without being overly verbose. A useful commit message increases chances that you patch will be merged to the master branch.
With the help of a GUI
Git also allows you to commit with the help of a GUI. Among other things this has the advantage that you can also select which individual hunks you'd like to commit.
Step 3: Merge upstream changes
If you got the code of the mob branch and before you upload your patch, somebody else committed a patch to the same branch, you should try to get and merge the updates first. Otherwise the changes already in the repository will be committed twice.
git pull # retrieve updates from server git merge origin/mob # merge changes into local mob-branch
If your local changes conflict with the newest source code, it will tell you and refuse to apply the remote patch.
4. Upload changes to server
Uploading your patches:
git push -v origin mob
Now you are done, and the patch is visible to the world at 
5. Inform the developers
It might be a good idea that the other developers know you just committed a patch. Please send an email to the "developers mailing list" to inform them, describing your patch. Thanks!
Other useful GIT stuff
You can see what you modified by doing:
To see the differences:
git diff <somefile> # differences within a file git diff # all differences in the current map of the branch
And to restore the file to its original version:
git checkout <filename> # restore a file git checkout -f # restore everything
[Summary: forget to change two occurences of cg to git]
- A useful 'Kernel Hackers' Guide to git' can be found at http://linux.yyz.us/git-howto.html