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
Brent Goodrick <bgoodr@gmail.com>
Date
Feb 18, 2009, 01:32 UTC
Message-ID
<e38bce640902171732j9b8801gca4223cdb96d2d34@mail.gmail.com>
In-Reply-To
<7v1vtw367w.fsf@gitster.siamese.dyndns.org>
On Tue, Feb 17, 2009 at 5:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> So at work, you would have a checkout of your work "deployment branch",
> and find needs to change things.  It is Ok to edit both work.sh and
> generic.sh (without being able to edit both, it would be hard to verify if
> the changes would work together) at this time, but don't commit the result
> in the work branch.
>
> Save the changes to work.sh away (e.g. "git diff work.sh >P.diff" and then
> "git checkout HEAD work.sh"), switch to the common branch, and commit the
> changes to the generic file.  Switch back to the deployment branch, merge
> the common branch (to pick up the changes to home.sh), reapply the changes
> specific to the deployment you saved earlier (e.g. "git apply P.diff"),
> tne commit the result.
>

Thanks. Well, I should have said in my initial request: "Without manually forwarding changes from branch to branch and without having to remember special rules about what I can and cannot merge into which branch", since that is likely to get forgotten. :)

The answer I am hearing you say is that git doesn't have a way to
automatically exclude files akin to how rsync handles include/exclude.
 Is that what you are saying? Or, could the hook mechanism be
exploited to get this behavior?
bg
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.