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

Re: How do I force git to forget about merging a binary file that is to stay deleted on the target branch?

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Mar 28, 2009, 10:23 UTC
Message-ID
<20090328192300.6117@nanako3.lavabit.com>
In-Reply-To
<e38bce640903272226l3facf47br9b1849bf708c3881@mail.gmail.com>
Quoting Brent Goodrick <bgoodr@gmail.com>:
> How do I commit a merge but force git to forget about merging one file
> that I don't want on the target branch, when it is binary, and when it
> was changed on the source branch, but was deleted on the target branch
> (and should stay deleted on the target branch)?
I think the standard answer is "you don't".
Instead of using only two branches ('home' and 'work'), you use one common branch (perhaps 'master') that is meant to hold the changes and files that are sharable between two places, and maintain two branches ('home' and 'work') that are forked from the common branch. You treat them as if they are release branches and employ the "Never merging back" workflow (see gitster's journal around middle of January this year).
At home (or at work), you record your changes that are also relevant to the other place to the common branch ('master'), and you record changes that are specific to the location to either 'home' or 'work'. And merge 'master' to 'home' and 'work' as necessary, but never merge 'home' nor 'work' to anything else.
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: Brent GoodrickNext: Brent Goodrick
Message 2 of 7 in “How do I force git to forget about merging a binary file that is to stay deleted on the target branch?”
  1. Brent GoodrickMar 28, 2009
  2. Nanako ShiraishiMar 28, 2009
  3. Brent GoodrickMar 28, 2009
  4. Elijah NewrenMar 28, 2009
  5. Brent GoodrickMar 28, 2009
  6. Junio C HamanoMar 28, 2009
  7. Brent GoodrickMar 28, 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.