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

Line Endings in Git #30

Open
rogerxu opened this issue Sep 6, 2017 · 2 comments
Open

Line Endings in Git #30

rogerxu opened this issue Sep 6, 2017 · 2 comments

Comments

@rogerxu
Copy link
Owner

rogerxu commented Sep 6, 2017

Dealing with line endings - User Documentation

@rogerxu
Copy link
Owner Author

rogerxu commented Sep 6, 2017

@rogerxu
Copy link
Owner Author

rogerxu commented Sep 6, 2017

Git - gitattributes Documentation

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
*.ini text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.bmp binary
*.ico binary
*.pdf binary
  • text - convert to LF line endings when check in
  • eol - convert line endings when check out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant