git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: config for merging master to test branch

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 29, 2009, 16:53 UTC
Message-ID
<7vvdfphgbu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091229164343.GA17546@panix.com>
Daniel Convissor <danielc@analysisandsolutions.com> writes:
Show 9 quoted lines
> 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.
Previous: Daniel ConvissorNext: Daniel Convissor
Message 3 of 5 in “config for merging master to test branch”
  1. Daniel ConvissorDec 28, 2009
  2. Daniel ConvissorDec 29, 2009
  3. Junio C HamanoDec 29, 2009
  4. Daniel ConvissorDec 29, 2009
  5. Junio C HamanoDec 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.