So, if you’re like me, you like to poke through the source of things from time to time but you always forget what the proper URL is for, say, GNOME git. Or Fedora hosted. Or whatever.
Well, good news, friend! Stuff this into your
~/.gitconfig and make your life a bit easier:
[url "git://git.fedorahosted.org/git/"] insteadOf = "fh:" [url "ssh://git.fedorahosted.org/git/"] insteadOf = "fh-ssh:" [url "git://git.gnome.org/"] insteadOf = "gnome:" [url "ssh://git.gnome.org/git/"] insteadOf = "gnome-ssh:" [url "git://anongit.freedesktop.org/git/"] insteadOf = "fdo:" [url "ssh://git.freedesktop.org/git/"] insteadOf = "fdo-ssh:"
Now you can do stuff like
git clone fdo:plymouth or
git clone fh-ssh:autoqa.git and it should Just Work*. Neat!
Now, if I was really clever, I’d find somewhere to ship this in the default Fedora install, or at least as part of the developer tools. Maybe someone else out there is really clever?
*Unless your local username is different from the remote username, in which case ssh might not work – but you can fix that by changing the url to
ssh://username@... or putting the following in
Host *.freedesktop.org User username