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.
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.
Re: Merging into a current branch
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.