Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have reviewed that kind of config setting (<code>crlf</code>) extensively in the question:<br> <strong><a href="https://stackoverflow.com/questions/2333424/distributing-git-configuration-with-the-code/2354278#2354278">distributing git configuration with the code</a></strong>.</p> <p>The conclusion was:</p> <ul> <li><strong><a href="https://stackoverflow.com/questions/1206406/dealing-with-files-that-git-refuses-to-reset/1206441#1206441">checkout/checking .gitattributes</a></strong> files</li> <li>list all types which explicitly need that kind of conversion.<br> For instance:</li> </ul> <pre> *.java +crlf *.txt +crlf ... </pre> <ul> <li>avoid doing any kind of conversion of type of files which don't need it, because of the various side-effect of such a conversion on merges, <code>git status</code>, shell environment and <code>svn import</code> (see "<a href="https://stackoverflow.com/questions/2333424/distributing-git-configuration-with-the-code/2354278#2354278">distributing git configuration with the code</a>" for links and references).</li> <li>avoid any <code>crlf</code> conversion altogether if you can.</li> </ul> <hr> <p>Now, regarding the specific issue of <strong>per-platform settings</strong>, branch is not always the right tool, especially for non-program related data (i.e; those settings are not related to what you are developing, only to the VCS storing the history of your development)</p> <p>As stated in the question <a href="https://stackoverflow.com/questions/431201/git-how-to-maintain-two-branches-of-a-project-and-merge-only-shared-data">Git: How to maintain two branches of a project and merge only shared data?</a>:</p> <blockquote> <p>your life will be vastly simpler if you put the system-dependent code in different directories and deal with the cross-platform dependencies in the build system (Makefiles or whatever you use).</p> </blockquote> <p>In this case, while branches could be use for system-dependent code, I would recommend directory for support tools system-dependent settings, with a script able to build the appropriate <code>.gitattributes</code> file to apply the right setting depending on the repo deployment platform.</p>
 

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