gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] How to share your GNUmed plugin code via GIT (gitorious)


From: Sebastian Hilbert
Subject: [Gnumed-devel] How to share your GNUmed plugin code via GIT (gitorious)
Date: Tue, 22 Jun 2010 12:53:29 +0200
User-agent: KMail/1.13.3 (Linux/2.6.33-6-desktop; KDE/4.4.3; i686; ; )

The original article is at

http://gnumed.blogspot.com/2010/06/how-to-share-your-gnumed-code-via-git.html

----------------

There may be different ways, better way but here is how you can share your code with the rest of the GNUmed community.

The GNUmed project use GIT as a way to host the source code and track changes. The GNUmed code can be found at gitorious. This so called repository has been created by Karsten Hilbert (ncq) and will host his changes to the GNUmed code. There is no such thing as the official GNUmed repository.

In order to share your code with the world through git you need to get yourself a gitorious account.

1.) Sign up with gitorious
2.) Start a new project (e.g. gnumed-yourshortname)
3.) Upload you plubic ssh key or create a new one if you have none

Once you have this you need to fill this with code. I assume you have a local git repository on your computer since you most likely created code by now. If you don't then start using GIT today.

Please see my previous article on GIT for GNUmed for information on how
to use git for your code.

Now it is time to upload your code. The repository you checked out is that
of ncq. Unless you were given write access to his repository (which is no
the way GIT works) you need to tell GIT on your computer that is has a
new home aka origin. There is an article on that and I will summarize it here.

To upload you code you need to tell git where to. The destination will be you
project on gitorious. For the beginning I have chosen to make a copy of the
git checkout on my computer. The checkout from ncq is in

~/sources/gnumed-head and the copy in ~/sources/gnumed-shilbert to reflect
which is my tree and what is ncq's (read-only) tree.

Now open ~/sources/gnumed-shilbert/.git and edit the file config. Before the
change it looks like this.

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = "" />[branch "master"]
remote = origin
merge = refs/heads/master

Change the line url = "" to let foo reflect your tree at gitorious. You will get the url
from gitorious once you have created your project and logged in.

After the change mine looks like this.

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = "" />[branch "master"]
remote = origin
merge = refs/heads/master

Now everything is configured to upload your local git tree to gitorious. Do it like
this to upload your newly created branch (template in my case).

git push origin template

The following output can be observed.

The authenticity of host 'gitorious.org (87.238.52.168)' can't be established.
RSA key fingerprint is 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitorious.org,87.238.52.168' (RSA) to the list of known hosts.
Enter passphrase for key '/home/basti/.ssh/id_rsa':
Counting objects: 91837, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (18055/18055), done.
Writing objects: 100% (91837/91837), 37.85 MiB | 71 KiB/s, done.
Total 91837 (delta 63311), reused 89983 (delta 61565)
=> Syncing Gitorious... [OK]
To address@hidden:gnumed-shilbert/gnumed.git
* [new branch] template -> template

Then push your master branch which initially will be identical to the ncq's
master branch until you or ncq change the now individual master branches.

address@hidden:~/Sources/gnumed-shilbert> git push origin master
Enter passphrase for key '/home/basti/.ssh/id_rsa':
Total 0 (delta 0), reused 0 (delta 0)
=> Syncing Gitorious... [OK]
To address@hidden:gnumed-shilbert/gnumed.git
* [new branch] master -> master


You are almost done. You have to announce it to the world :-) You can e.g. sendan e-mail to the mailing-list at gnumed-devel at gnu.org and point people to your code. They will then look at it and maybe incorporate them into their own trees.

If you however decide that you do not want to use git you can always send files and patches directly to the mailing-list for review.

Sebastian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]