From a4061168dfa7c6bb9ef23ec0b290f512950a5547 Mon Sep 17 00:00:00 2001 From: Richard Ebeling Date: Tue, 21 Nov 2023 01:08:27 +0100 Subject: [PATCH] Disable CRLF conversion for bash scripts on repo level, removing requirement for global config on user machines. --- .gitattributes | 6 ++++++ README.md | 17 +++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..f18463fe43 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# If users want to have files converted to CRLF, we can tolerate that +* text=auto + +# except for .sh and .conf files, since bash will error out when encountering CR characters +*.conf eol=lf +*.sh eol=lf \ No newline at end of file diff --git a/README.md b/README.md index 5b3b53f3e3..e891a4f270 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,9 @@ The easiest setup using [Vagrant](https://www.vagrantup.com) is shown here. 1. Fork the EvaP repository (using the Fork-button in the upper right corner on GitHub). -2. Windows users only (might not apply for the Linux subsystem): - * Line endings: git's [`core.autocrlf` setting](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf) has to be `false` or `input` so git does not convert line endings on checkout, because the code will be used in a Linux VM: - - ```bash - git config --global core.autocrlf input - ``` - * We have observed [weird](https://github.com/hashicorp/vagrant/issues/9143#issuecomment-401088752) [behavior](https://github.com/git-for-windows/git/issues/3657) with ssh in Git Bash on Windows and thus recommend using PowerShell instead. In theory, you should be able to use any command line tool. - -3. Run the following commands on the command line to clone the repository, create the Vagrant VM and run the Django development server. - To use Docker, replace `vagrant up` with `vagrant up --provider docker && vagrant provision`. +2. Run the following commands on the command line to clone the repository, create the Vagrant VM and run the Django development server. + * Windows users: We have observed [weird](https://github.com/hashicorp/vagrant/issues/9143#issuecomment-401088752) [behavior](https://github.com/git-for-windows/git/issues/3657) with ssh in Git Bash on Windows and thus recommend using PowerShell instead. In theory, you should be able to use any command line tool. + * To use Docker, replace `vagrant up` with `vagrant up --provider docker && vagrant provision`. ```bash git clone --recurse-submodules https://github.com//EvaP.git cd EvaP @@ -38,7 +31,7 @@ The easiest setup using [Vagrant](https://www.vagrantup.com) is shown here. ./manage.py run ``` -4. Open your browser at http://localhost:8000/ and login with email `evap@institution.example.com` and password `evap`. +3. Open your browser at http://localhost:8000/ and login with email `evap@institution.example.com` and password `evap`. That's it! @@ -63,4 +56,4 @@ MIT, see [LICENSE.md](LICENSE.md). ## Supported Browsers -The platform is only tested in Mozilla Firefox and Google Chrome. Other browsers might not render all pages correctly. +The platform is only tested in Mozilla Firefox and Google Chrome. Other browsers might not render all pages correctly. \ No newline at end of file