From bb45bc37b015d43305e610e2400d89689d5b2ecc Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Fri, 1 Jul 2022 09:46:10 +0200 Subject: [PATCH] docs: prevent line ending problems when self-hosting on Windows (#16326) --- docs/development/best-practices.md | 9 ++++++++- docs/usage/getting-started/installing-onboarding.md | 12 ++++++++++++ docs/usage/getting-started/running.md | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/development/best-practices.md b/docs/development/best-practices.md index b9155bbdd9..32443b35f5 100644 --- a/docs/development/best-practices.md +++ b/docs/development/best-practices.md @@ -173,5 +173,12 @@ Use [Named Capturing Groups](https://www.regular-expressions.info/named.html) wh ### Windows -We recommend you set [`core.autocrlf = input`](https://git-scm.com/docs/gitattributes#_text) in your `gitConfig`, or the carriage return `\r\n` might confuse Renovate bot. +We recommend you set [`core.autocrlf = input`](https://git-scm.com/docs/gitattributes#_text) in your Git config. +You can do this by running this Git command: + +```bash +git config --global core.autocrlf input +``` + +This prevents the carriage return `\r\n` which may confuse Renovate bot. You can also set the line endings in your repository by adding `* text=auto eol=lf` to your `.gitattributes` file. diff --git a/docs/usage/getting-started/installing-onboarding.md b/docs/usage/getting-started/installing-onboarding.md index 9cc5b3e7ee..5f42accfb9 100644 --- a/docs/usage/getting-started/installing-onboarding.md +++ b/docs/usage/getting-started/installing-onboarding.md @@ -39,6 +39,18 @@ Once you're done selecting repositories for Renovate to run on, click the green Unfortunately Mend's hosted GitLab app needed to be taken offline indefinitely until a viable security model for bots on GitLab.com is available. For more details on GitLab security for bots, please see the [GitLab Bot Security](../gitlab-bot-security.md) doc. +### Self-hosting on Windows + +We recommend you set [`core.autocrlf = input`](https://git-scm.com/docs/gitattributes#_text) in your Git config. +You can do this by running this Git command: + +```bash +git config --global core.autocrlf input +``` + +This prevents the carriage return `\r\n` which may confuse Renovate bot. +You can also set the line endings in your repository by adding `* text=auto eol=lf` to your `.gitattributes` file. + ## Repository onboarding Once you have enabled Renovate on a repository, you will get a "Configure Renovate" Pull Request looking something like this: diff --git a/docs/usage/getting-started/running.md b/docs/usage/getting-started/running.md index ddded8a81a..c9bad88fb3 100644 --- a/docs/usage/getting-started/running.md +++ b/docs/usage/getting-started/running.md @@ -16,6 +16,8 @@ Self-hosting Renovate means that you are the "administrator" of the bot, which e - You ensure it's running regularly, - You ensure Renovate bot itself is updated +Read our section on [Self-hosting on Windows](./installing-onboarding.md#self-hosting-on-windows) to prevent line endings from confusing Renovate bot. + ### Available distributions #### npm package (CLI) -- GitLab