Windows 7
> Git Bash
> git init
creates a .git
folder that has the Hidden
Attribute
, but nothing inside it is given that Attribute
. I prefer to remove that Attribute
(I un-tick it in FreeCommander XE
> Properties
), so that I can easily look inside from Explorer
(which I prefer to leave at its default setting of hiding hidden stuff). Is there any technical reason why I should not do this (ie leave that 'git
folder hidden)?
Asked
Active
Viewed 454 times
2
2 Answers
2
To answer your question as written: No. Git doesn't care or know whether or not that folder is hidden.
It adds that attribute by default on Windows to match the default-hidden behavior on other operating systems. It's hidden because it contains things needed for the management of the Git repository which should be transparent to the user, and there are very few reasons for said user to go digging around in there.

xathien
- 812
- 7
- 10
-
If, like me, you're curious as to how `Git` works, then looking in the `.git` folder can be helpful, particularly to see the settings in the `config` file. In `GNU/Linux`, a simple `Ctrl+H` unhides any hidden files (folders), not so simple in Windows. – joharr Apr 07 '15 at 19:44
-
1Interacting with the config file can also be done via `git-config`, e.g. `git config --list` to see all the settings. But I understand that it can be educational to poke around, which is why I finished with "very few reasons" rather than "no reason". :) – xathien Apr 07 '15 at 22:22
1
No. There is no reason it's hidden except to keep a person from accidentally deleting it or changing it's contents.

Edward Thomson
- 74,857
- 14
- 158
- 187