git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git pull on a branch semantics
@ 2006-01-22 20:58 Luben Tuikov
  2006-01-22 21:02 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Luben Tuikov @ 2006-01-22 20:58 UTC (permalink / raw)
  To: git

Hi,

pwd is a git repo; current branch is A; there's a few
branches in this git repo.
In .git/remotes/ I've a file name "projectC", which looks like:

URL:<url>
Pull:projectC:projectC
Push:projectC:projectC

That is both here and remotely I've projectC being a branch
here and remotely.

I'd like to pull changes to projectC only, from the remote projectC to the local projectC, but my
current branch is A.

I blissfully do:

git pull projectC

git correctly tells me that the heads are the same in
branchC here and remote, but it then goes ahead to merge
projectC in the current branch A (project A) since they
have a common ancestor.

But because of the "Pull" line in .git/remotes/projectC
what the intention was is to pull from projectC remotely
and merge any new changes in projectC locally, and only
in projectC (irrespective of what the current branch
is (in the pwd)).

Is this behavior a bug or is this a "feature"?

Thanks,
   Luben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git pull on a branch semantics
  2006-01-22 20:58 git pull on a branch semantics Luben Tuikov
@ 2006-01-22 21:02 ` Junio C Hamano
  2006-01-24 15:37   ` Luben Tuikov
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-01-22 21:02 UTC (permalink / raw)
  To: ltuikov; +Cc: git

Luben Tuikov <ltuikov@yahoo.com> writes:

> URL:<url>
> Pull:projectC:projectC
> Push:projectC:projectC
>
> That is both here and remotely I've projectC being a branch
> here and remotely.
>
> I'd like to pull changes to projectC only, from the remote projectC to the local projectC, but my
> current branch is A.
>
> I blissfully do:
>
> git pull projectC

You wanted to "git fetch", not "git pull" which is "fetch
followed by merge into the current branch".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git pull on a branch semantics
  2006-01-22 21:02 ` Junio C Hamano
@ 2006-01-24 15:37   ` Luben Tuikov
  0 siblings, 0 replies; 3+ messages in thread
From: Luben Tuikov @ 2006-01-24 15:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

--- Junio C Hamano <junkio@cox.net> wrote:
> You wanted to "git fetch", not "git pull" which is "fetch
> followed by merge into the current branch".

Ah, ok, thanks Junio.

   Luben

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-24 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-22 20:58 git pull on a branch semantics Luben Tuikov
2006-01-22 21:02 ` Junio C Hamano
2006-01-24 15:37   ` Luben Tuikov

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).