origin/branchname and tracking branch pointing to different commits?

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

origin/branchname and tracking branch pointing to different commits?

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:47:58

Hi,

Could you, please, help me to understand how it is  possible to have a
tracking branch named qa which tracks origin/qa both pointing to
different commits after git pull origin qa?

I.e. I currently see this picture in my repository when

$ git co qa
$git log

gives me qa branch history advanced by 4 commits comparing to origin/qa

while

$git pull origin qa

says it is already up to date

So, generally, speaking qa branch is fine and is in synch with the
remote mainline, but the state of local origin/qa is not clear.

Thanks,
Eugene

Re: origin/branchname and tracking branch pointing to different commits?

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:58

Eugene Sajine wrote:
$git pull origin qa
[...]
So, generally, speaking qa branch is fine and is in synch with the
remote mainline, but the state of local origin/qa is not clear.
'git pull $remote $branch' does not update the $remote/$branch
remote-tracking branch; it stores in FETCH_HEAD and merges straight
from there.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: origin/branchname and tracking branch pointing to different commits?

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:47:58

On Thu, Jan 7, 2010 at 12:12 PM, Thomas Rast [off-list ref] wrote:
Eugene Sajine wrote:
quoted
$git pull origin qa
[...]
quoted
So, generally, speaking qa branch is fine and is in synch with the
remote mainline, but the state of local origin/qa is not clear.
'git pull $remote $branch' does not update the $remote/$branch
remote-tracking branch; it stores in FETCH_HEAD and merges straight
from there.

--
Thomas Rast
trast@{inf,student}.ethz.ch
Yep. That's what i though it is. I.e. origin/branchname will point
always to the last pushed commit only. Isn't it a bit strange that git
fetch doesn't update origin/qa?

Probably the problem is that whenever I'm pulling or pushing to remote
repo i expect the last updated state of particular remote branch to be
reflected in origin/branchname, but IMHO it is correct expectation...

What do you think?

Thanks,
Eugene

Re: origin/branchname and tracking branch pointing to different commits?

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:47:59

Yep. That's what i though it is. I.e. origin/branchname will point
always to the last pushed commit only. Isn't it a bit strange that git
fetch doesn't update origin/qa?

Probably the problem is that whenever I'm pulling or pushing to remote
repo i expect the last updated state of particular remote branch to be
reflected in origin/branchname, but IMHO it is correct expectation...

What do you think?
let me correct my self a little bit:

$ git pull origin branchname

and

$git fetch origin branchname

are both causing the output like this:
From git://....
* branch      branchname    -> FETCH_HEAD
...

but "git fetch" says:
From git://....
* branch      branchname    -> origin/branchname

Is this inconsistent behavior necessary by design?

Thanks,
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help