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

Re: query regarding git merge

From
Jeff King <peff@peff.net>
Date
Dec 14, 2015, 21:13 UTC
Message-ID
<20151214211320.GE14788@sigill.intra.peff.net>
In-Reply-To
<20151213192316.GM990758@vauxhall.crustytoothpaste.net>
On Sun, Dec 13, 2015 at 07:23:17PM +0000, brian m. carlson wrote:
Show 11 quoted lines
> On Mon, Dec 14, 2015 at 12:03:18AM +0530, Rohit Gupta wrote:
> > Thanks brian. I understood my mistake in understanding the working of git
> > merge.
> > But isn't it wrong? As after merging, branch's logic can't work. How to get
> > that right then ?
> 
> If you know that the merge didn't go the way you wanted, you can either
> add a follow-up commit, or you can do "git commit --amend" on the merge
> after making the necessary changes.  In such a case, it may be useful to
> add a note to the commit message stating that you modified it from the
> original merge.

And a fundamental takeaway here is that git-merge can only find _textual_ conflicts. It is up to the user to determine that the merge didn't introduce any _semantic_ conflicts. For example, by building and testing the result, which is out of git's scope.

-Peff
Previous: brian m. carlson
Message 4 of 4 in “query regarding git merge”
  1. rohit guptaDec 13, 2015
  2. brian m. carlsonDec 13, 2015
  3. brian m. carlsonDec 13, 2015
  4. Jeff KingDec 14, 2015

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.