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

Re: Updating a branch.

From
Tim Henigan <tim.henigan@gmail.com>
Date
Oct 22, 2009, 20:31 UTC
Message-ID
<32c343770910221331q2b419d7dvc5c89ab3864348ca@mail.gmail.com>
In-Reply-To
<26015707.post@talk.nabble.com>
On Thu, Oct 22, 2009 at 3:21 PM, elyod72 <elyod72@gmail.com> wrote:
Show 12 quoted lines
>
> I am a newbie to git, so please bear with me.
> Here is the scenario that I am struggling with:
>
> I have my Master branch.
> I then create a new branch named Test.
> I then make changes and additions to the test branch.
> At the same time I make changes to the Master branch.
> Now I want to update the Test branch with the latest information from the
> Master branch.
>
> How do I go about doing that?
In general, the following is recommended:
  1) If possible, complete your work on the Test branch without merging
     the changes.  Save your merge (and any potential conflict resolution)
     for when the Test branch is complete and fully tested.
  2) If Test absolutely requires the changes made in Master, then perform
     a "git rebase master" from your Test branch.  This operation replays
     the commits you have made to Test on top of your latest commit to
     Master.

See the gitworkflows man page [1] for further information. The section on "Topic Branches" should be helpful.

This post [2] on StackOverflow has some helpful info as well.
-Tim

[1] http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html [2] http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions

Previous: Avery PennarunNext: Tim Mazid
Message 3 of 4 in “Updating a branch.”
  1. elyod72Oct 22, 2009
  2. Avery PennarunOct 22, 2009
  3. Tim HeniganOct 22, 2009
  4. Tim MazidOct 28, 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.