git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Imbert <matthieu.imbert@inria.fr>
To: git@vger.kernel.org
Subject: Re: remote branches
Date: Sun, 13 Feb 2011 11:07:11 +0100	[thread overview]
Message-ID: <4D57AD4F.3030109@inria.fr> (raw)
In-Reply-To: <AANLkTi=WPAYXg1NCyO+XDw8Jk5v=QBH3nM78CEHytuVQ@mail.gmail.com>

On 02/13/2011 10:17 AM, Ævar Arnfjörð Bjarmason wrote:
> On Sun, Feb 13, 2011 at 08:42, Matthieu Imbert<matthieu.imbert@inria.fr>  wrote:
>
>> $ git clone
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>> linux-2.6.git
>>
>> - then i add a remote tracking branch:
>>
>> $ git remote add --tags drm-intel
>> git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git
>
> You're adding a remote repository and tracking branches and tags from
> it.
>
>> - Then i do git fetch or git fetch drm-intel, but nothing happens, and git
>> branch -r still only show me origin/HEAD and origin/master, no drm-intel
>> branches, though these branches do exist since i can see them with git
>> remote -v show drm-intel
>
> You didn't add any remote tracking *branch*, you added a remote and
> gave it the name "drm-intel". You could just as well do:
>
>      git remote add --tags some-random-name
> git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git
>
> Also because you specified --tags you're only getting the tags on "git
> fetch", if you don't do that then:
>
>      $ git fetch some-random-name
>      remote: Counting objects: 567, done.
>      remote: Compressing objects: 100% (377/377), done.
>      remote: Total 488 (delta 371), reused 146 (delta 111)
>      Receiving objects: 100% (488/488), 91.42 KiB, done.
>      Resolving deltas: 100% (371/371), completed with 53 local objects.
>      From git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel
>       * [new branch]      drm-intel-fixes ->  some-random-name/drm-intel-fixes
>       * [new branch]      drm-intel-fixes-2 ->  some-random-name/drm-intel-fixes-2
>       * [new branch]      drm-intel-next ->  some-random-name/drm-intel-next
>       * [new branch]      drm-intel-staging ->  some-random-name/drm-intel-staging
>
> Which allows you to do:
>
>      $ git checkout --track some-random-name/drm-intel-fixes
>      Branch drm-intel-fixes set up to track remote branch
> drm-intel-fixes from some-random-name.
>      Switched to a new branch 'drm-intel-fixes'

You're right, the faulty option was --tags. Trying without this i was 
able to fetch.
Thanks,

-- 
Matthieu

  reply	other threads:[~2011-02-13 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13  7:42 remote branches Matthieu Imbert
2011-02-13  9:17 ` Ævar Arnfjörð Bjarmason
2011-02-13 10:07   ` Matthieu Imbert [this message]
2011-02-13 10:08   ` Andreas Schwab
2011-02-13 10:13     ` Matthieu Imbert
2011-02-13 10:31   ` Björn Steinbrink
2011-02-14  6:12     ` Junio C Hamano
2011-02-16 18:00       ` Christian Jaeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D57AD4F.3030109@inria.fr \
    --to=matthieu.imbert@inria.fr \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).