Friday·15·October·2010
Thoughts on Gitorious and GitHub plus a useful git hook //at 11:36 //by abe
When I took over the developement of xen-tools, I looked around for an appropriate git hosting. I especially had a look at GitHub and Gitorious.
If you just regard the features, GitHub is definitely more targetted on single developers and Gitorious more towards projects:
At GitHub, every repository has its URL under the URL of a user page which makes it nearly impossible to have user independent, “official” repositories for projects which have more than one official developer.
At Gitorious, every hosted repository needs to belong to a project, even if it’s only a published configuration. But a project can have more than one git repository. You only seem to be able to have personal repositories if you clone some existing Gitorious repository.
So from a feature point of view, the xen-tools git repositories fit way better to Gitorious’ hosting while the git repositories with zshrc, conkerorrc and desktop configuration files defintely have a more fitting addresses on GitHub, in my case http://github.com/xtaran/$repository. On Gitorious, they are now together under a “project” called “Axel’s configuration files” at http://gitorious.org/abe which contains git repositories of my on grml’s .zshrc based .zshrc, my configuration for Conkeror and all the files necessary for my ratpoison/xmobar based netbook/laptop desktop.
I though feel a little bad for giving the project the very short “slug” name “abe” instead of “abe-config” (as I did initially) since “abe” is IMHO not a proper “project name” for my configuration files and possibly other projects would have a more reasonable claim for that project name on Gitorious. But that way it suites more its purpose: Gather some of my git repositories which don’t belong to a proper project.
But there’s another important point when comparing Gitorious and GitHub: Free Software needs free tools as Benjamin Mako Hill posted recently on Planet Debian. Despite my (probably well known) distrust against Google and therefore also Google Code, and despite knowing the history of SourceForge becoming non-free, I was not that much aware that GitHub’s software is only partially open source and therefore also not free software while Gitorious is both as it’s licensed under the GNU Affero General Public License (like StatusNet/identi.ca for example) which is basically GPLv3, but its ideas applied to hosted web applications scenario (where the GPL itself doesn’t grasp), too.
Initially I just had the xen-tools git repositories on Gitorious and all my small one-repository “projects” as copies of the repositories on my own git server on GitHub to get some more publicity for them and allow “social cloning”. After reading Mako’s article, I decided to at least have repository clones on Gitorious of all repositories I mirror at GitHub, too.
That way I force nobody to use the non-free tools on GitHub for
“social cloning” one of my git repositories. And of course I have
copies of my code somewhere on the net as backup. Or to say it with
Linus Torvalds’ (slightly updated) words: Only wimps use tape
backup: real men just upload their important stuff on git, and let the
rest of the world clone it.
;-)
But isn’t that tedious to always push your code to three repositories?
No, it isn’t. I just push my code to git.noone.org where I have configured the according remotes and
the following post-receive
hook:
#!/bin/sh read oldrev newrev refname git push gitorious ${refname:t} git push github ${refname:t}
The only other thing necessary is to use ssh-agent and SSH agent
forwarding to at least the host you’re pushing to.
Tagged as: .zshrc, abe, Agent Forwarding, AGPL, Conkeror, Free Software, git, GitHub, Gitorious, gitweb, Google, Google Code, GPL, grml, Hook, Hosting, identi.ca, Linus Torvalds, mako, non-free, Open Source, Planet Debian, Ratpoison, Real Man, Social Coding, Social Networking, SourceForge, SSH, ssh-agent, StatusNet, xen-tools, zsh
3 comments // show without comments // write a comment