Git branching & pulling

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Git branching & pulling

From: Wink Saville <hidden>
Date: 2016-06-15 22:43:11

Hello,

I'm having trouble understanding branching and pull.

Using git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
I can create a branch off the master and do a pull:

wink@ic2d1:~/linux/linux-2.6$ git-checkout master
Switched to branch "master"
wink@ic2d1:~/linux/linux-2.6$ git-checkout -b test
Switched to a new branch "test"
wink@ic2d1:~/linux/linux-2.6$ git-pull
Already up-to-date.



But from some reason using
git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git
the following happens

wink@ic2d1:~/linux/kvm-linux-2.6$ git-checkout master
Already on branch "master"
wink@ic2d1:~/linux/kvm-linux-2.6$ git-checkout -b test
Switched to a new branch "test"
wink@ic2d1:~/linux/kvm-linux-2.6$ git-pull
Warning: No merge candidate found because value of config option
         "branch.test.merge" does not match any remote branch fetched.
No changes.



What I notice is that in kvm.git that .git/remotes is empty while on
linux-2.6.git
.git/remotes has origin and it contains:

URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Pull: refs/heads/master:refs/heads/origin


Another difference is that the .git/config file of kvm.git has quite a
few items:

[core]
 repositoryformatversion = 0
 filemode = true
 bare = false
 logallrefupdates = true
[remote "origin"]
 url = git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git
 fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
 remote = origin
 merge = refs/heads/master



While linux-2.6.git is quite sparse:

[core]
        repositoryformatversion = 0
        filemode = true



Could someone give me some insight or point me at a url or doc
that could shed some light on what is happening and why git-pull
doesn't work on kvm.git.

Thanks,

Wink Saville

Re: Git branching & pulling

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:43:11

On Fri, May 18, 2007 at 10:40:17PM -0700, Wink Saville wrote:
Hello,

I'm having trouble understanding branching and pull.

Using git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
I can create a branch off the master and do a pull:

wink@ic2d1:~/linux/linux-2.6$ git-checkout master
Switched to branch "master"
wink@ic2d1:~/linux/linux-2.6$ git-checkout -b test
Switched to a new branch "test"
wink@ic2d1:~/linux/linux-2.6$ git-pull
Already up-to-date.



But from some reason using
git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git
the following happens

wink@ic2d1:~/linux/kvm-linux-2.6$ git-checkout master
Already on branch "master"
wink@ic2d1:~/linux/kvm-linux-2.6$ git-checkout -b test
Switched to a new branch "test"
wink@ic2d1:~/linux/kvm-linux-2.6$ git-pull
Warning: No merge candidate found because value of config option
        "branch.test.merge" does not match any remote branch fetched.
No changes.
The differences you describe are almost certainly due to differences in
the git version, not the cloned repository.  Are you sure git wasn't
ugpraded between the two tests?

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help