Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce LF line endings #69

Closed
Raruto opened this issue Sep 13, 2022 · 1 comment · Fixed by #76
Closed

Enforce LF line endings #69

Raruto opened this issue Sep 13, 2022 · 1 comment · Fixed by #76
Labels
config Anything related to configuration files

Comments

@Raruto
Copy link
Collaborator

Raruto commented Sep 13, 2022

For example, add some .gitattributes rules in order to prevent CRLF conversion for bash scripts.

Related to: g3w-suite/g3w-client#181

@Raruto
Copy link
Collaborator Author

Raruto commented Sep 16, 2022

How to see what type of line endings are already in git repository?

You can use this command:

git ls-files --eol

It will output one line per file with the following information:

i/lf    w/crlf  attr/text=auto eol=lf   file.txt

In that example, i/lf means that the file uses lf in the index, and w/crlf means it uses crlf in the working directory.

@Raruto Raruto added the config Anything related to configuration files label Sep 22, 2022
Raruto added a commit that referenced this issue Sep 26, 2022
Add `* text=auto` in order to prevent `LF` --> `CRLF` conversion on Windows OS

Closes: #69
Raruto added a commit that referenced this issue Oct 28, 2022
Add `* text=auto` in order to prevent `LF` --> `CRLF` conversion on Windows OS

Closes: #69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Anything related to configuration files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant