Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have always found the <code>autocrlf</code> config property problematic. (as expressed in my answer <a href="https://stackoverflow.com/questions/1249932/git-1-6-4-beta-on-windows-msysgit-unix-or-dos-line-termination/1250133#1250133">Git 1.6.4 beta on Windows (msysgit) - Unix or DOS line termination</a>)</p> <ul> <li>it not only make <a href="https://stackoverflow.com/questions/1598709/git-cygwin-trailing-whitespace-causes-not-uptodate/1598962#1598962">some merges tricky</a></li> <li>it can vary <a href="https://stackoverflow.com/questions/690502/can-i-use-msysgit-and-cygwins-git/690747#690747">depending on the shell used within one environment</a></li> <li>it also has issue with <a href="https://stackoverflow.com/questions/2016404/git-status-shows-modifications-git-checkout-file-doesnt-remove-them">git status</a></li> <li>and with <a href="https://stackoverflow.com/questions/1042207/git-svn-rebase-fails/1042597#1042597">svn import</a>.</li> </ul> <p>Note: <a href="http://code.google.com/p/msysgit/issues/detail?id=538#c5" rel="nofollow noreferrer">msysgit issue 538</a> for setting it to true (which is the default value set by the msysgit installer), but I am not convinced.</p> <p>I would prefer one of the three following solutions for:</p> <ul> <li>configuring one end-of-line style</li> <li>making that configuration propagate through the different Git repos</li> </ul> <p>1. Using the new <a href="https://stackoverflow.com/questions/3206843/how-line-ending-conversions-work-with-git-core-autocrlf-between-different-operati/3209806#3209806">config setting <strong><code>core.eol</code></strong></a> (1.7.2+)</p> <blockquote> <p>Sets the line ending type to use in the working directory for files that have the text property set.<br> Alternatives are '<code>lf</code>', '<code>crlf</code>' and '<code>native</code>', which uses the platform's native line ending.<br> The default value is native.</p> </blockquote> <p>2. a <a href="https://stackoverflow.com/questions/1206406/dealing-with-files-that-git-refuses-to-reset/1206441#1206441">checkout/checking <code>.gitattribute</code></a>. See <a href="http://git-scm.com/docs/gitattributes" rel="nofollow noreferrer">gitattributes</a> man page: <code>crlf</code> or <code>core.autocrlf</code> is the way to record in a <code>.gitattributes</code> file what is was previously a local config attribute. </p> <p>3. a <a href="https://stackoverflow.com/questions/2316677/can-git-automatically-switch-between-spaces-and-tabs/2316728#2316728">git attribute filter driver</a> which can:</p> <ul> <li>enforce any kind of formatting standard you may want to set</li> <li>apply those standards to certain files/directories</li> <li>be recorded as a config file (<code>.gitattributes</code>) able to be pushed anywhere.</li> </ul>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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