Why is it that when using “git bash” in windows it does not appear the same as when opening “wsl Ubuntu” in windows as well?

Solution for Why is it that when using “git bash” in windows it does not appear the same as when opening “wsl Ubuntu” in windows as well?
is Given Below:

I just advanced a project, I did git add and then git commit to the advances, all through Git bash, I check with git status and it seemed clean. But when entering my files through wsl Ubuntu on windows10, I did not see the commits made, not even the “(master)” next to the path, and when I put git status everything was in red (Untracked).

I have the impression that it is 2 different machines in one and that is why you did not register it, but I would like to confirm it. And also before connecting it with GitHub I would like to know that you recommend me to use: the Git bash console or **Ubuntu wsl on windows10? Thanks.

it look this way

I’ve seen this before when accessing a repo in VSCode that I was modifying via WSL’s git. Unfortunately, I can’t remember the exact details, and I can’t reproduce it now.

There are two things I remember that have caused problems in this area:

  • Case sensitivity issues: I believe I saw the issue in the Microsoft WSL2 Linux kernel Github repo, and it was something like this. That doesn’t quite sound like what you are seeing, though, since all your changes were originally done under Windows git. But it’s something to consider – Is there any commit that could have caused a case-sensitivity conflict? Also worth reading is this Microsoft blog on the topic (and additional WSL options for dealing with case-sensitivity interop with Windows drives).

  • Sometimes permission issues can surface when attempting to use WSL/Linux git on your Windows drive. These can usually be resolved by creating (or editing, if it exists) a /etc/wsl.conf file with the following contents:

    [automount]
    options = "metadata,umask=22,fmask=11"
    

    The metadata option allows WSL to Linux-level permissions on files/directories on your Windows drive. The fmask/umask determine the default Linux permission set of files/directories on your Windows drive.

Neither of these quite sound like your problem, but they are worth checking out.