Comments (6)
Cygwin tries very hard to make a Unix-like environment on Windows (and pays for it in performance), hence the default end-of-line character is a line feed there.
Git for Windows tries very hard to integrate with standard Windows, which uses DOS-style line endings, i.e. carriage return followed by a line feed.
You can easily change the setting if you want to deviate from the platform's default: Just have a look at the core.autocrlf variable in .git/config: changing it to false will tell Git to keep the line-endings identical between the working directory and the repository. Note: if you change the setting, you will most likely have to deal with your fellow developers yelling at you for committing DOS-line endings into the repository, because it will happen.
For details, search for core.autocrlf in http://kernel.org/pub/software/scm/git/docs/git-config.html.
from git.
@dscho yeah, I understand with my .gitattributes
file, checking out files with cygwin git and msysgit might cause the files have different eols, but when commiting/normalizing, both platform should have the eols normalized to LF, right? but from warning it looks like msysgit tries to normalize the eols to CRLF, that's what I wish to be fixed. Thanks
from git.
@ryenus the warning is about the file, i.e. the working directory.
from git.
No. LF is simply wrong on Windows.
from git.
@kusma but according the manual, setting text to auto does mean to normalize all the eols to LF
Set to string value "auto"
When text is set to "auto", the path is marked for automatic end-of-line normalization. If git decides that the content is text, its line endings are normalized to LF on checkin.
and I do believe the point of this is to ensure true cross-platform support.
from git.
I was talking about the working directory, which is what the warning is about. Perhaps we could make the warning less confusing?
core.autocrlf normalize to LF in the repo, but it will also change the working-copy version to CRLF if it already contains LF-newlines.
from git.
Related Issues (20)
- Redirect to Git for Windows 2.x HOT 10
- Why I am not able to use curl commands ? HOT 1
- "Entrust Root Certification Authority - G2" is not trusted HOT 5
- .git subdirectory is created in the wrong place on checkout when using relative directory HOT 16
- umeng123
- Windows installer not cryptographically signed. HOT 3
- Using mingw-perl HOT 5
- git rev-list crashes when --show-notes and --grep are specified HOT 2
- Git SVN crash HOT 3
- Git daemon and TortoiseGit HOT 2
- fox
- Git Blame - file.dot is not a Word Document HOT 3
- Missing patch tool for release candidate of Git for Windows. HOT 1
- Custom mergetool cmd support in git GUI HOT 1
- Git.exe is stuck if I run a wrong command. HOT 1
- Not able to clone gerrit repo over https via gitbash(windows client) HOT 5
- please add a release to announce the move of release downloads to the git-for-windows repo HOT 7
- <invalid>
- Filename too long when cloning a repo HOT 3
- Cannot Create Shortcut, Cannot Find App, Cannot Open App HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.