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

Re: remote branches

From: Matthieu Imbert <hidden>
Date: 2016-06-15 22:50:33

On 02/13/2011 10:17 AM, Ævar Arnfjörð Bjarmason wrote:
On Sun, Feb 13, 2011 at 08:42, Matthieu Imbert[off-list ref]  wrote:
quoted
$ 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.
quoted
- 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help