Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy still care about newline conversions in git? Why not binary all-the-way?
    primarykey
    data
    text
    <p>Shortend question:</p> <p>Can I solve my various Git line-ending cross-platform conversion problems by using .gitattributes and setting the problematic files to binary? I have no control over the repo or the users settings.</p> <p>Also: is CRLF still needed at-all for web-oriented Windows development? Most tools have either auto-detection or options to switch mode and seem to work fine with LF-only.</p> <p>(removed rant)</p> <p>Note: I already read many (all?) answers about this here on SO, read the <a href="https://help.github.com/articles/dealing-with-line-endings" rel="nofollow">help</a>, read the <a href="http://git-scm.com/book/ch7-1.html" rel="nofollow">book</a> and burned way too much time on this.</p> <p><strong>Update:</strong> </p> <p>I'm not looking at <a href="https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html" rel="nofollow">this help file</a> and it mentions un-setting <code>text</code> in .gitattributes:</p> <blockquote> <p>Unset</p> <p>Unsetting the text attribute on a path tells git not to attempt any end-of-line conversion upon checkin or checkout.</p> </blockquote> <p>Why both "help.github.com" and "git-scm.com" don't mention this as a possible solutions is beyond me, but the description looks good. </p> <p>But the github help does mentions it cursory, which is why I think this is what I want.</p> <blockquote> <p>binary setting is an alias for -text -diff</p> </blockquote> <p>I'm going to try that, and update if it works out.</p> <p><strong>Update 2:</strong> </p> <p>It worked! Use <code>*.txt -text</code> in .gitattributes did the trick: no conversions but still diffable and line/char summaries etc)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload