git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Convissor <danielc@analysisandsolutions.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: config for merging master to test branch
Date: Tue, 29 Dec 2009 08:53:41 -0800	[thread overview]
Message-ID: <7vvdfphgbu.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20091229164343.GA17546@panix.com> (Daniel Convissor's message of "Tue\, 29 Dec 2009 11\:43\:44 -0500")

Daniel Convissor <danielc@analysisandsolutions.com> writes:

> On Mon, Dec 28, 2009 at 06:38:39PM -0500, Daniel Convissor wrote:
>> 
>> Now, here's the question.  I want to go back into the testing directory 
>> and do a "git pull" and have the changes from master automatically merged 
>> into my test branch in one step, without having to do an explicit set of 
>> checkouts and merges.
>
> I found this is possible by being in the "test" checkout and calling
> "git pull origin master".  Is this the best way to do it?

Good.  That is how it was designed to be used ;-)

If you feel lazy and want to omit typing " origin master", you could add a
few configuration items in your .git/config in the test repository.

    [branch "test"]
        remote = origin
        merge = refs/heads/master

That configures git in such a way that...

    When on branch "test", "pull" and "fetch" by default interact with the
    "origin" repository, and "pull" integrates what was found on the
    'master' branch from that remote into your history.

  reply	other threads:[~2009-12-29 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28 23:38 config for merging master to test branch Daniel Convissor
2009-12-29 16:43 ` Daniel Convissor
2009-12-29 16:53   ` Junio C Hamano [this message]
2009-12-29 17:56     ` Daniel Convissor
2009-12-29 18:32       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvdfphgbu.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=danielc@analysisandsolutions.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).