Sitelet https://github.com/microsoft/vscode-python/discussions/26207
Skip to content
Discussion options

You must be logged in to vote

I'd check line endings first, especially if the repository is being used across Windows and Unix-based systems.

Start by checking your Git configuration:

git config --show-origin --get core.autocrlf

Then check whether Git sees an actual content difference:

git diff --ignore-space-at-eol

If the diff disappears when ignoring end-of-line whitespace, line-ending conversion is probably the cause.

For a repository shared across different operating systems, .gitattributes is usually a better solution than relying on every developer to configure core.autocrlf correctly. For example:

* text=auto

You can also explicitly define important file types:

*.sh text eol=lf
*.py text eol=lf
*.bat text eol=crlf

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johnson980522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants