Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: how to clone all branches include remote branches

From: Johannes Gilger <hidden>
Date: 2016-06-15 22:46:08

On 2009-02-10, gnu kevin [off-list ref] wrote:
I'd like to know how to get all remote(grandparent) branches by clone
a remote repo . for example:
remote repo ABC contains below branches:
master
stable/main
dev/main
You could (if your .git/config) already contains the remote simply add a 
line:
fetch = +refs/remotes/*:refs/remotes/<remote-name>/remotes/*

The double remotes is used so that no remote-remote-branch can overwrite 
your tracking branch with the same name.

Hope that helped,
Jojo

-- 
Johannes Gilger [off-list ref]
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help