Linked Questions
40 questions linked to/from How do I force Git to use LF instead of CR+LF under Windows?
2 votes
1 answer
819 views
Bash scripts Git cloned in VSCode are automatically converted to DOS format [duplicate]
Platform: Windows 10 Editor: VSCode Hi, I am working on Windows using WSL and develop on VSCode. I notice that whenever I clone a project that contains Bash scripts into VSCode, these scripts are ...
1302 votes
27 answers
1.2m views
Git replacing LF with CRLF
On a Windows machine, I added some files using git add. I got warnings saying: LF will be replaced by CRLF What are the ramifications of this conversion?
949 votes
8 answers
885k views
How to change line-ending settings
Is there a file or menu that will let me change the settings on how to deal with line endings? I read there are 3 options: Checkout Windows-style, commit Unix-style Git will convert LF to CRLF when ...
702 votes
9 answers
274k views
What's the strategy for handling CRLF (carriage return, line feed) with Git?
I tried committing files with CRLF-ending lines, but it failed. I spent a whole work day on my Windows computer trying different strategies and was almost drawn to stop trying to use Git and instead ...
109 votes
7 answers
166k views
How to change the EOL for all files from CRLF to LF
In Visual Studio Code, I have changed the default EOL (end-of-line token) from CRLF to LF, but this only applies to new files. I would like to know how to change the EOL for all files at once as I ...
84 votes
10 answers
141k views
How can I write a ESLint rule for "linebreak-style", changing depending on Windows or Unix?
As we all know, the linebreaks (new line) used in Windows are usually carriage returns (CR) followed by a line feed (LF) i.e. (CRLF) whereas, Linux and Unix use a simple line feed (LF) Now, in my ...
187 votes
3 answers
74k views
What is the purpose of `text=auto` in `.gitattributes` file?
Mostly .gitattributes file has * text=auto. What is the purpose of text=auto in that file?
57 votes
4 answers
51k views
Distributing git configuration with the code
In trying to standardise the platform for the developers, one of my needs would be to commit the .git/config so that everybody have the same CRLF config without forgetting to set it by hand. How do I ...
57 votes
3 answers
39k views
Best practices for cross platform git config?
Context A number of my application user configuration files are kept in a git repository for easy sharing across multiple machines and multiple platforms. Amongst these configuration files is ....
60 votes
3 answers
68k views
Git: how to renormalize line endings in all files in all revisions?
I have an existing repository where line endings are all messed up. I'd like to rewrite the entire repository and fix line endings once and for all. There are text files and binary files, let's ...
54 votes
3 answers
23k views
What will `* text=auto eol=lf` in gitattributes do?
We have this in our .gitattributes file: * text=auto eol=lf I'd like to precisely understand what this does. The first part is text=auto. From the documentation: This ensures that all files that ...
16 votes
2 answers
34k views
"[eslint] Delete `CR` [prettier/prettier]" on Windows
I am getting a CR ESLint error - even though I have the git pull code with Windows line endings. This occurs in Visual Studio Code with ESLint plugin (1.7.0). This did not occur until I recently ...
5 votes
3 answers
40k views
No such file or directory in docker build
I am new to docker and attempting to port an app over to it. Essentially, on startup, the app needs to perform some environment dependent work which I have encapsulated in a script. My app looks like ...
16 votes
1 answer
9k views
How to get git to change the line ending in the working directory?
I have git on windows configured with git config --global core.autocrlf false so that git does not auto convert files on checkout from LF line endings to CRLF. When I create a new file on windows and ...
5 votes
3 answers
5k views
Vb 6.0 project loading error
I have recently downloaded vb6.o project file from bitbucket but unable to run project it generates following error in log files '0' could not be loaded Line 0: The file E:\cas\Forms\errorform.frm ...