FloatingRock
FloatingRock

Reputation: 7065

Why are files created in git bash not visible in Windows explorer?

So I just moved from Ubuntu to Windows (read forced to move, thanks to compatibility issues) and am using Git Bash to pull in my files. I've noticed something extremely strange.

Git Bash is installed in C:\Program Files (x86)\Git\, and when I first run the Git Bash program, the default location is this. Normal right? Right.

But here's the weird part..

When I run the command mkdir srv in the Git Bash command line, I can see it in the Bash window - but I can't see it in Windows Explorer?! What the heck. Same thing happens with files created using vi in the CLI. Invisible in Windows Explorer. (Yes, I have enabled the Show hidden files option in Explorer, so it's not that).

Here are some snapshots (no, I'm not blind - nor am I insane). Help? Now you see it Now you don't

Upvotes: 10

Views: 9812

Answers (3)

Arek Bee
Arek Bee

Reputation: 329

I had similar issue, but with file attributes, not with missing privileges. In cmd under C:\Program Files (x86)\Git\ run command attrib

attrib *

You will know if srv folder has System or Hidden file attribute.

If you would like to view it in cmd then use dir /a:s

Upvotes: 0

yozniak
yozniak

Reputation: 695

The proposed solutions above didn't help me. However, I copied the hidden directories to another place via git bash. Then I copied them once again via windows explorer to the original place. Now they've become visible. I created those invisible folders via git bash with git clone command before.

Upvotes: 1

Chronial
Chronial

Reputation: 70753

You might not be able to see the folder because of missing privileges. Try running your explorer as Administrator and look again.

Upvotes: 3

Related Questions