From: Johannes Gilger Date: Tue, 10 Feb 2009 18:05:42 GMT Subject: Re: how to clone all branches include remote branches Message-ID: In-Reply-To: <95463c700902100949w23a95536re9a65a2e5c3c0b5d@mail.gmail.com> On 2009-02-10, gnu kevin 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//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 http://hackvalue.de/heipei/ GPG-Key: 0x42F6DE81 GPG-Fingerprint: BB49 F967 775E BB52 3A81 882C 58EE B178 42F6 DE81