No .git repository folder showing, using windows 7

I installed git v1.9.2 and was working with it using the CLI.

After changing the settings in windows to show the hidden files and folders, I can see the .git folder in my repository.


Although I have the Windows Explorer option selected to show hidden files and folders (and even show protected operating system files) the .git folder is still not visible. I pressed <F5> and it still doesn't show up.

However, at the command prompt I can see it by typing

dir /ah

from the repository directory.

After some time, the .git file finally showed up in Windows Explorer as well. I suspect Explorer hadn't received a callback notification that the directory had changed yet, and apparently <F5> doesn't override that...for hidden files. Or maybe Windows Explorer was apprehensive at first about showing a dotted and hidden file (folder) for the first time. :>


If git inited, added and committed the folder with no problem then there is a .git folder there. If you can't see it in Windows Explorer then you need to enable the showing of hidden and system files and folders in Windows Explorer.

The free eBook "Pro Git" is really helpful for getting up to speed with git. There is also another free one called "Git Succincly" that you have to register for but it's an undercut to Pro Git and I've not had any spam or annoying followups from it.

Hope that helps.


With git 2.9, the .git/ folder remains hidden by default, but now has a new config:

git config core.hideDotFile dotGitOnly

That new setting allows to configure how to hide or not dot files.

See commit ebf31e7, commit f30afda (11 May 2016) by Johannes Schindelin (dscho).
(Merged by Junio C Hamano -- gitster -- in commit bfc99b6, 17 May 2016)

mingw: introduce the 'core.hideDotFiles' setting:

On Unix (and Linux), files and directories whose names start with a dot are usually not shown by default. This convention is used by Git: the .git/ directory should be left alone by regular users, and only accessed through Git itself.

On Windows, no such convention exists. Instead, there is an explicit flag to mark files or directories as hidden.

In the early days, Git for Windows did not mark the .git/ directory (or for that matter, any file or directory whose name starts with a dot) hidden. This lead to quite a bit of confusion, and even loss of data.

Consequently, Git for Windows introduced the core.hideDotFiles setting, with three possible values: true, false, and dotGitOnly, defaulting to marking only the .git/ directory as hidden (dotGitOnly).

The rationale: users do not need to access .git/ directly, and indeed (as was demonstrated) should not really see that directory, either.
However, not all dot files should be hidden by default, as e.g. Eclipse does not show them (and the user would therefore be unable to see, say, a .gitattributes file).

In over five years since the last attempt to bring this patch into core Git, a slightly buggy version of this patch has served Git for Windows' users well: no single report indicated problems with the hidden .git/ directory, and the stream of problems caused by the previously non-hidden .git/ directory simply stopped.
The bugs have been fixed during the process of getting this patch upstream.

The git config man page now include:

core.hideDotFiles

(Windows-only) If true, mark newly-created directories and files whose name starts with a dot as hidden.
If 'dotGitOnly', only the .git/ directory is hidden, but no other files starting with a dot.
The default mode is 'dotGitOnly'.

Tags:

Git