Re: git pull and merging.

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

 



On 12/6/06, Junio C Hamano <junkio@xxxxxxx> wrote:
"Aneesh Kumar" <aneesh.kumar@xxxxxxxxx> writes:

> I have a git.git clone using --use-separate-remote. That means i have
> the master branch created by default. Now i need to build git from the
> pu branch too. So i created git branch pu remotes/origin/pu.
>
>
> How how do i track the pu branch using git pull. What i mean is the
> master local branch is tracked by default using git pull. Is there a
> way to track the local pu branch too.

        $ cat >.git/remotes/origin <<\EOF
        URL: ...kernel.org/pub/scm/git/git.git
        Pull: refs/heads/master:refs/remotes/origin/master
        Pull: refs/heads/next:refs/remotes/origin/next
        Pull: +refs/heads/pu:refs/remotes/origin/pu
        EOF

Then you would checkout 'pu' by having a matching local branch:

        $ git branch pu remotes/origin/pu
        $ git checkout pu ;# this is your refs/heads/pu
        $ make

Hacking on it can be done in this branch as usual.  When you are
interested in the latest 'pu' from me:

        $ git checkout pu ;# this is your refs/heads/pu
        $ git fetch ;# most of the time git pull would also be fine...

and then:

        $ git rebase remotes/origin/pu

The 'rebase' in the last step is because my 'pu' rewinds freely;
otherwise you would do "git merge remotes/origin/pu" instead.



Okey what i was looking for was a .git/config that will imply as a
part of git pull origin that local

master is to track remotes/origin/master
pu  should track remotes/origin/pu.

I almost felt the branch.<name>.merge was for that.

What is this git-repo-config used for. I am trying to understand


branch.<name>.remote and branch.<name>.merge usage.

-aneesh
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]