Skip to content

Commit

Permalink
docs: prevent line ending problems when self-hosting on Windows (#16326)
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkingGoose committed Jul 1, 2022
1 parent 7adab3c commit bb45bc3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/development/best-practices.md
Expand Up @@ -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.
12 changes: 12 additions & 0 deletions docs/usage/getting-started/installing-onboarding.md
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions docs/usage/getting-started/running.md
Expand Up @@ -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)
Expand Down

0 comments on commit bb45bc3

Please sign in to comment.