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

Re: Is there a way to exclude user-specified files or directories from participating in merges?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2009, 19:02 UTC
Message-ID
<7v3aeby3eh.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<slrngpo3hp.boq.sitaramc@sitaramc.homelinux.net>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 7 quoted lines
> Let me explain where I'm coming from: this is very often needed when you
> maintain customer specific branches, and the workflows in both your
> posts in this thread so far are too complex for, err, me <sheepish grin>
> :-)
>
> Would it not be easier to do something like this?  (I suck at 2-d
> drawing, even line... but this should still be understandable)

What you drew is a detailed discussion on a technique to use to group together common part and customer specific part, and I think it is Ok to do whatever you feel comfortable with. It is essentially the same as my "in real life, 'git diff >P.diff' is not how I would do this" example, just going into more detail on what you would do to sift 'common only' vs 'specific to work branch' apart, and I think what you are doing is sane.

But if you wrote it as a draft of a document to explain how-to to new people, I think you need to clarify a few things.

It is unclear in your description how the "common" branch progressed in the whole process, and how the resulting history looks. I can guess that you meant commits marked with alphabet letters are of common kind and numbers are of work kind, but you do not want to force readers to guess.

It also is not quite clear that you are using a temporary branch in addition to common and work, and where in your sequence you are doing "git checkout" to switch branches.

Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 8 of 9 in “Is there a way to exclude user-specified files or directories from participating in merges?”
  1. Brent GoodrickFeb 18, 2009
  2. Junio C HamanoFeb 18, 2009
  3. Brent GoodrickFeb 18, 2009
  4. Junio C HamanoFeb 18, 2009
  5. Brent GoodrickFeb 18, 2009
  6. Junio C HamanoFeb 18, 2009
  7. Sitaram ChamartyFeb 18, 2009
  8. Junio C HamanoFeb 18, 2009
  9. Sitaram ChamartyFeb 19, 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.