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

Re: Really beginner on Version Control

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Sep 22, 2010, 22:13 UTC
Message-ID
<AANLkTin60S-6dtSmcYGqQTgBbpqXFLJWhJWfCWgpiA0E@mail.gmail.com>
In-Reply-To
<1285114417273-5557145.post@n2.nabble.com>

On Wed, Sep 22, 2010 at 4:13 AM, FernandoBasso <FernandoBasso.br@gmail.com> wrote:

Show 6 quoted lines
>
> For instance, I have 'hello' in line 2 of site.php in the master branch. I
> go to the  testing branch, edit site.php, change 'hello' for 'world' at the
> same line, commit and got back to master. I merge testing into master and I
> get no conflicts. Shouldn't it conflict ? (site.php in master also contains
> the string 'world' in the place of 'hello' now).

Conflicts happen only if two branches have contradictory _changes_ to the same line. If you merge some branch, it means you accept all changes from it. So, if one branch has no changes, and the other branch has some changes then all changes from the other branch will be accepted without any conflict. The special case when there is no changes on your current branch but only on the merged branch is often described as fast-forward merge, because the result merge does not produce any new commit, but only advance the current state to the state of the other branch.

Dmitry
Previous: Thomas HochsteinNext: Dmitry Potapov
Message 16 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.