supporting roaming via git URL rewriting

Adam Spiers vcs-home at adamspiers.org
Fri Dec 23 02:13:11 CET 2011


On Thu, Dec 22, 2011 at 9:41 PM, Bruce Schultz <bruce.schultz at gmail.com> wrote:
> On 23/12/11 01:16, Adam Spiers wrote:
>> 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://public.adamspiers.org/home/adam/
>>
>> and when I get back:
>>
>>   git url-rewrite atlantic: ssh://atlantic/home/adam/
>
> I solved that situation by adding the external name (ie public.adamspiers.org)
> to the DNS on my ADSL router.
>
> So if I'm on my LAN at home, public.adamspiers.org -> 10.0.0.12
>
> But if I'm away from the house, its port forwarded through the router to my
> workstation.

Nice trick!  But it doesn't solve the other case (laptop switching
between wireless/wired).


More information about the vcs-home mailing list