Re: Pulling to git branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 07 February 2009 17:41:07 Himanshu Chauhan wrote:
> On Sat, 2009-02-07 at 22:06 +0530, Himanshu Chauhan wrote:
> > Hi,
> >
> > I pulled linus' git tree and make a branch on it. So I have to master:
> > master
> > * swapoutclustering
> >
> > As seen, I am working on swapoutclustering branch. But when I do a
> > simple git pull, I see the following message.
> >
> > You asked me to pull without telling me which branch you
> > want to merge with, and 'branch.swapoutclustering.merge' in
> > your configuration file does not tell me either.  Please
> > name which branch you want to merge on the command line and
> > try again (e.g. 'git pull <repository> <refspec>').
> > See git-pull(1) for details on the refspec.
> >
> > If you often merge with the same branch, you may want to
> > configure the following variables in your configuration
> > file:
> >
> >     branch.swapoutclustering.remote = <nickname>
> >     branch.swapoutclustering.merge = <remote-ref>
> >     remote.<nickname>.url = <url>
> >     remote.<nickname>.fetch = <refspec>
> >
> > See git-config(1) for details.
> >
> > What am I missing in my command?

if you're in branch swapoutclustering, and do a git pull, git looks into the 
git config to find which branch and which remote that goes together. As you 
have no remote tied to your swapoutclustering, git is reluctant to pull into 
that branch.

You can do the steps that git pull does automatically for you, and replace 
master with where you are now:

git fetch origin # fetch all changes from origin (i.e. Linus' tree)
git merge origin/master # merge the master-branch of origin into your current 
branch.

> >
> > Regards
> > - Himanshu
>
> I checkout master and then did a git pull... which worked.

yes, as .git/config will contain master and origin :-)

or, you could do (to repeat myself)
git fetch origin
git merge origin/master


>
> Thanks
>
> Regards
> - Himanshu


-- 
 -> henrik

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux