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

Enable end-of-line normalization with Git attributes #164

Merged
merged 2 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ install additional packages using the following commands:
The project template should also work natively on Windows.
Pull requests to document Windows specifics are welcome!

.. note::

When working with this template on Windows,
configure your text editor or IDE
to use only `UNIX-style line endings`__ (line feeds).

__ https://en.wikipedia.org/wiki/Newline

The project template contains a `.gitattributes`__ file
which enables end-of-line normalization for your entire working tree.
Additionally, the Prettier_ code formatter converts line endings to line feeds.
Windows-style line endings (`CRLF`) should therefore never make it into your Git repository.

__ https://git-scm.com/book/en/Customizing-Git-Git-Attributes

Nonetheless, configuring your editor for line feeds is recommended
to avoid complaints from the pre-commit_ hook for Prettier.


Getting Python
--------------
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.project_name}}/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf