You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In troubleshooting section (edit to make less verbose if you please)
My Linux console cannot find or will not execute my shell scripts:
Within Unix and Linux systems such as Ubuntu, shell scripts must have LF (Line Feed) line endings in order to properly execute with the terminal/console. However, if you are using Windows, depending on your development environment and Git settings, these line endings may have been converted to CRLF (Carriage Return Line Feed) line endings, which prevent your shell files from being properly executed within a Linux context.
Within the immediate, there are two options to remedy this issue:
Manually change the line endings of the file from CRLF to LF within your IDE of choice.
Install and run the dos2unix package on your troublesome file by running these commands:
To convert each file within your directory to LF line endings, simply run this command instead:
find . -type f -exec dos2unix {} +
To prevent Git from changing file line endings during the cloning or forking process, simply type in the command below. This command will prevent Git from performing any contextual conversions on the line endings of cloned files, thus preserving the files' original line endings.
git config --global core.autocrlf false
Alternatively, you could run the following command instead, which simply converts any CRLF files to LF line ending files, while maintaining files which already have LF line endings.
git config --global core.autocrlf input
The text was updated successfully, but these errors were encountered:
This is a great explanation of the problem at hand but would like to keep the guides as concise as possible. So I'll go ahead and link back to this issue for those who need some additional context!
In troubleshooting section (edit to make less verbose if you please)
My Linux console cannot find or will not execute my shell scripts:
Within Unix and Linux systems such as Ubuntu, shell scripts must have LF (Line Feed) line endings in order to properly execute with the terminal/console. However, if you are using Windows, depending on your development environment and Git settings, these line endings may have been converted to CRLF (Carriage Return Line Feed) line endings, which prevent your shell files from being properly executed within a Linux context.
Within the immediate, there are two options to remedy this issue:
To convert each file within your directory to LF line endings, simply run this command instead:
find . -type f -exec dos2unix {} +
To prevent Git from changing file line endings during the cloning or forking process, simply type in the command below. This command will prevent Git from performing any contextual conversions on the line endings of cloned files, thus preserving the files' original line endings.
git config --global core.autocrlf false
Alternatively, you could run the following command instead, which simply converts any CRLF files to LF line ending files, while maintaining files which already have LF line endings.
The text was updated successfully, but these errors were encountered: