This is almost entirely so that I remember how to do this. A big thanks for arcanez for showing me this in the first place.

The Problem

In the Perl community, numerous important git repositories are hosted at shadowcat, but of course if you went to that url you would not be able to see all the work that I have spent on each of those projects. I like the fact that github has a nice concise view of my work.

The Solution

The following is an example of a section from my .git/config in my DBIx-Class-DeploymentHandler:

1
2
3
4
5
6
7
8
9
[remote "all"]
   url = dbsrgits@git.shadowcat.co.uk:DBIx-Class-DeploymentHandler.git
   url = git@github.com:frioux/DBIx-Class-DeploymentHandler.git
[remote "origin"]
   fetch = +refs/heads/*:refs/remotes/origin/*
   url = dbsrgits@git.shadowcat.co.uk:DBIx-Class-DeploymentHandler.git
[remote "github"]
   fetch = +refs/heads/*:refs/remotes/github/*
   url = git@github.com:frioux/DBIx-Class-DeploymentHandler.git

This lets you push to origin, github, or all. I tend to only pull from origin and push to all. Hopefully this can at least be a reference for people :-)