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

Ignoring commits when merging

From
MSMike Strauch <mike.strauch@hannonhill.com>
Date
Aug 17, 2010, 20:21 UTC
Message-ID
<AANLkTi=B9gsroJS_6SRqa2CLQOed2UguxN7KiFtFWL8t@mail.gmail.com>
Hi,

I'm fairly new to git and I'm trying to figure out the best way to ignore certain commits when merging one branch into another.  I've found a solution that suggests that I merge everything before the commit I want to skip, then merge the commit I want to skip using the "ours" merging strategy, then merge everything after the skipped commit.  This sounds like an adequate solution to the problem, but I'm wondering if there's a better way to do it.

I was thinking that I could just cherry-pick the few commits that I want from Branch 2 in order to exclude the commit I don't want, but this will result in there being no link between the branches for those commits.  Are there any other ways this can be done?

-- Mike Strauch www.hannonhill.com

Next: Jonathan Nieder
Message 1 of 4 in “Ignoring commits when merging”
  1. Mike StrauchAug 17, 2010
  2. Jonathan NiederAug 18, 2010
  3. Mike StrauchAug 18, 2010
  4. Jonathan NiederAug 18, 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.