[antlr-interest] redirecting git forks

Terence Parr parrt at cs.usfca.edu
Fri Feb 10 08:29:41 PST 2012


From Zenaan Harkness:

> For those not so familiar with git, here is a quick way to update your
> remote urls for "origin":
> 
> To view current remote(s):
> git remote -v
> 
> To change url of remote named "origin" for antl.git to antlr3.git:
> git remote set-url origin https://github.com/antlr/antlr3.git
> 
> And similar for stringtemplate.
> 
> Now, I only had an st4 github repo, so I just added the st3 repo to my
> existing st4 git clone, under a different remote name ("st3" funnily
> enough), as follows:
> git remote add st3 https://github.com/antlr/stringtemplate3.git
> git fetch st3
> git branch st3 st3/master
> git branch -a
> 
> Then of course you can swap between st3 and origin i.e. st4 if it's
> called origin, or you could rename origin to st4 or add a branch named
> st4 as you wish.
> 
> Note that if you do as I did (combining st3 and st4), you will get a
> warning saying that no shared root/parent commit was found. This is
> expected. It is of course not at all necessary to have combined repo,
> just a preference of mine...
> 
> Regards
> Zen


More information about the antlr-interest mailing list