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

Re: Really beginner on Version Control

From
Andreas Ericsson <ae@op5.se>
Date
Sep 21, 2010, 16:40 UTC
Message-ID
<4C98DFF7.2030801@op5.se>
In-Reply-To
<1285080133451-5555023.post@n2.nabble.com>
On 09/21/2010 04:42 PM, FernandoBasso wrote:
Show 6 quoted lines
> 
> I am really a beginner in. Bear with me please.
> 
> Why do we merge, say a testing branch into the master branch ? What is the
> use of it ?
> 

Because the sum of the whole is greater than the parts. Most features in git for example are developed on topic branches. This makes it possible to keep unfinished code separate from the production branch that people actually use.

> When there is a conflict when merging branches (merging the testing into the
> current branch), should I edit the 'current' branch or the 'testing' branch
> ?
> 

You should edit the working tree, since that's where the conflict will be staged. When you're done, commit the results and that will be a new commit on the branch you're on.

> Should both branches have exactly the same code so that they can be merged
> without conflicts ?
> 

Both branches should most definitely not have exactly the same code. If they did, there would be no point in merging them. The merge-result shouldn't have the same code as any of the branches either, unless you actually want to throw one branch away, in which case you'd be far better off doing just that.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: FernandoBassoNext: Jakub Narebski
Message 7 of 17 in “Really beginner on Version Control”
  1. FernandoBassoSep 21, 2010
  2. Thomas MoulardSep 21, 2010
  3. Enrico WeigeltSep 21, 2010
  4. Eric RaibleSep 24, 2010
  5. Enrico WeigeltSep 24, 2010
  6. FernandoBassoSep 24, 2010
  7. Andreas EricssonSep 21, 2010
  8. Jakub NarebskiSep 21, 2010
  9. FernandoBassoSep 22, 2010
  10. Andrew KellerSep 22, 2010
  11. FernandoBassoSep 22, 2010
  12. FernandoBassoSep 22, 2010
  13. Tor ArntsenSep 22, 2010
  14. Dmitry PotapovSep 22, 2010
  15. Thomas HochsteinSep 22, 2010
  16. Dmitry PotapovSep 22, 2010
  17. Dmitry PotapovSep 22, 2010

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.