git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merging into a current branch
@ 2007-07-30  5:40 Geoff Russell
  2007-07-30  5:48 ` Shawn O. Pearce
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Russell @ 2007-07-30  5:40 UTC (permalink / raw)
  To: git

Dear gits,

Is there any reason why

git fetch origin branchX:branchX

fails if I am on branchX?   All I want to do is fast forward it.

Cheers,
Geoff.

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

* Re: Merging into a current branch
  2007-07-30  5:40 Merging into a current branch Geoff Russell
@ 2007-07-30  5:48 ` Shawn O. Pearce
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2007-07-30  5:48 UTC (permalink / raw)
  To: Geoff Russell; +Cc: git

Geoff Russell <geoffrey.russell@gmail.com> wrote:
> Is there any reason why
> 
> git fetch origin branchX:branchX
> 
> fails if I am on branchX?   All I want to do is fast forward it.

Yes.

A fetch will *only* update the branch.  If the branch is your current
branch it won't update the working directory.  This safety check
is to prevent the branch from updating, but the working directory
staying unchanged, and the resulting git-status output looking like
you just undid all of the recent work done on branchX of origin.

Try git-pull instead:

  git pull origin branchX


-- 
Shawn.

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

end of thread, other threads:[~2007-07-30  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30  5:40 Merging into a current branch Geoff Russell
2007-07-30  5:48 ` Shawn O. Pearce

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