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

Re: how to configure Git to treat certain type of ascii files as binary files

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 22, 2008, 22:40 UTC
Message-ID
<m3hc74i73a.fsf@localhost.localdomain>
In-Reply-To
<65d12cb10810221458j14ef0009u679cdb0f73299d7f@mail.gmail.com>
"Weiwei Shu" <shuww1980@gmail.com> writes:
Show 10 quoted lines
> My first post in this mailing list. Could some one direct me to some
> document/manual pages to setup Git to treat ascii files as binary
> files? I'm using Git to do circuit schematics (SPICE files)
> versioning. I will not do any merging or editing stuff with external
> editors. The only way to change it is to use schematic capture GUIs
> (Cadence, ADS, etc). So I'd like to treat them as binary files to
> reduce the possibilities of messing them up.
> 
> I know it seems a little bit stupid to use Git to do such an easy job.
> But hey, it's the most eye-catching SCM software, isn't it?

First, git does not modify files unless you have core.crlf set, and even then it warns about irreversible transformations (core.safecrlf)

Second, using gitattributes you can set diff driver and merge driver; one of possibilities is to treat file as binary (binary diff and no using 3-way file merge).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: David SymondsNext: Weiwei Shu
Message 5 of 6 in “how to configure Git to treat certain type of ascii files as binary files”
  1. Weiwei ShuOct 22, 2008
  2. david@lang.hmOct 22, 2008
  3. Weiwei ShuOct 22, 2008
  4. David SymondsOct 22, 2008
  5. Jakub NarebskiOct 22, 2008
  6. Weiwei ShuOct 23, 2008

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.