supporting roaming via git URL rewriting

Bruce Schultz bruce.schultz at
Thu Dec 22 22:41:29 CET 2011

On 23/12/11 01:16, Adam Spiers wrote:
> Here's another situation in which this inconvenience is more
> pronounced: my main desktop machine "atlantic" is reachable both via
> the LAN and via the internet (using port forwarding from my public
> static IP).  So if I'm on a laptop and pull from it via the LAN, and
> then later leave the LAN and want to pull from or push to it again via
> ADSL, there's more work to be done.
> However I just discovered git's URL rewriting feature, which solves
> this by allowing an extra layer of indirection.  I wrote this utility:
> Now I can configure a single remote pointing to my desktop machine,
> with URL "atlantic:path/to/repo".  When I leave the house, I run:
>   git url-rewrite atlantic: ssh://
> and when I get back:
>   git url-rewrite atlantic: ssh://atlantic/home/adam/

I solved that situation by adding the external name (ie
to the DNS on my ADSL router.

So if I'm on my LAN at home, ->

But if I'm away from the house, its port forwarded through the router to my

More information about the vcs-home mailing list