Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git in vscode does not detect git status correctly if the files are on another OS partition #98735

Closed
elieobeid7 opened this issue May 28, 2020 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@elieobeid7
Copy link

elieobeid7 commented May 28, 2020

  • Have a dual booted PC, in my case it's windows 10 and Manjaro, previously it was windows 10 and Ubuntu 16.04, I had the same issue

  • Have a git project placed on windows 10 partition, C drive or whatever

  • Boot into Linux, mount that partition and open the project in VSCode

  • Do a git pull from the terminal, it will say everything is up to date

  • Look at the git icon in vscode menu, it will show that you have files to commit.

I don't know if the same issue is on mac, I don't have a mac to test. I use vscode on both Linux and windows. Maybe the issue is with .vscode folder? Can't tell for sure, maybe vscode is trying to read configurations off windows from that folder and it's not the same, or maybe it's something else.

@joaomoreno
Copy link
Member

Look at the git icon in vscode menu, it will show that you have files to commit.

What files? What if you run git status from the terminal, what does that output?

@joaomoreno joaomoreno added the ~info-needed Issue requires more information from poster (with bot comment) label May 29, 2020
@elieobeid7
Copy link
Author

You're right, git status reports modified files. I fixed it by following this question

microsoft/WSL#184

git config --global core.filemode false
git config --global core.autocrlf true

I believe that the second line is the one that fixed it.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants
@joaomoreno @elieobeid7 and others