Home > Blockchain >  Reopening in a Container in Vscode - git issue
Reopening in a Container in Vscode - git issue

Time:07-18

I have a project with a .devcontainer folder with appropriate setup files. So, through Vscode I can open the project in a docker container with the configured environment for development and testing. But when I open it in a container all the files in the project are tagged as Modified. But when I change any file, save it, and open it locally then only that file is modified.

I'm not sure why this is happening and is this expected?

CodePudding user response:

So, I found the answer and the issue was with different line endings conversion between Windows(local env) and the docker container. Using the following and cloning the repo again resolved the issue.

git config --global core.autocrlf false

A detailed discussion is in the link below: https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files

  • Related