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
Copy file name to clipboardExpand all lines: docs/remote/troubleshooting.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,22 +270,24 @@ To change Docker's drive and folder sharing settings:
270
270
271
271
### Resolving Git line ending issues in containers (resulting in many modified files)
272
272
273
-
Since Windows and Linux use different default line endings, you may see files that appear modified but seem to have no differences aside from the line endings. To prevent this from happening, you can disable automatic line ending conversion. Just add a `.gitattributes` file to your folder and then run:
273
+
Since Windows and Linux use different default line endings, you may see files that appear modified but seem to have no differences aside from the line endings. To prevent this from happening, you can disable automatic line ending conversion and optionally add a `.gitattributes` file to your folder. First, run:
274
274
275
275
```bash
276
276
git config --global core.autocrlf false
277
277
```
278
278
279
-
You will need to re-clone the repository for this setting to take effect.
280
-
281
-
Optionally, you can add the following contents to a `.gitattributes` file to force everything in the repo to use LF endings except for windows batch files that require CRLF:
279
+
Next, you can prevent others from facing this issue regardless of their setting by adding or modifying a `.gitattributes` file in your repository. For example, this will force everything to be LF except for Windows batch files that require CRLF:
282
280
283
281
```yaml
284
282
*.* text eol=lf
285
283
*.{cmd,[cC][mM][dD]} text eol=crlf
286
284
*.{bat,[bB][aA][tT]} text eol=crlf
287
285
```
288
286
287
+
You can add other file types in your repository that require CRLF to this same file.
288
+
289
+
Finally, re-clone the repository for so these setting take effect.
290
+
289
291
### Avoid setting up Git in a container when using Docker Compose
290
292
291
293
To avoid having to set up Git a second time in your container, VS Code automatically adds a volume mount to your local Git configuration when referencing an `image` or `Dockerfile`. The Docker Compose scenario gives you more control, but in this case requires adding an extra configuration line to your `docker-compose.yml` file.
@@ -528,22 +530,24 @@ Some extensions rely on libraries not found in the vanilla install of certain WS
528
530
529
531
### Resolving Git line ending issues in WSL (resulting in many modified files)
530
532
531
-
Since Windows and Linux use different default line endings, you may see files that appear modified but seem to have no differences aside from the line endings. To prevent this from happening, you can disable automatic line ending conversion and add a `.gitattributes` file to your folder. Then run:
533
+
Since Windows and Linux use different default line endings, you may see files that appear modified but seem to have no differences aside from the line endings. To prevent this from happening, you can disable automatic line ending conversion and optionally add a `.gitattributes` file to your folder. First, run:
532
534
533
535
```bash
534
536
git config --global core.autocrlf false
535
537
```
536
538
537
-
You will need to re-clone the repository for this setting to take effect.
538
-
539
-
Optionally, you can add the following contents to a `.gitattributes` file to force everything to be LF except for windows batch files that require CRLF:
539
+
Next, you can prevent others from facing this issue regardless of their setting by adding or modifying a `.gitattributes` file in your repository. For example, this will force everything to be LF except for Windows batch files that require CRLF:
540
540
541
541
```yaml
542
542
*.* text eol=lf
543
543
*.{cmd,[cC][mM][dD]} text eol=crlf
544
544
*.{bat,[bB][aA][tT]} text eol=crlf
545
545
```
546
546
547
+
You can add other file types in your repository that require CRLF to this same file.
548
+
549
+
Finally, re-clone the repository for so these setting take effect.
550
+
547
551
## Extension tips
548
552
549
553
While many extensions will work unmodified, there are a few issues that can prevent certain features from working as expected. In some cases, you can use another command to work around the issue, while in others the extension may need to be modified. This section provides a quick reference for common issues and tips on resolving them. You can also refer to the main extension article on [Supporting Remote Development](/api/advanced-topics/remote-extensions) for an in-depth guide on modifying extensions when required.
0 commit comments