git init will not create git directories for me

jmknpk picture jmknpk · Mar 7, 2015 · Viewed 25.7k times · Source

I am new to Git. I can get a Git directory structure in a bare directory with git -init --bare. I can see where the git information is stored.

However, when I try to use git init or even git clone, I never see any .git subdirectory in my local repository. I can add files and push, but have no idea where those files are actually stored on disk for my local repository.

From the documentation:

$ git init

This creates a new subdirectory named .git that contains all of your necessary repository files – a Git repository skeleton.

However, I never see that skeleton directory. I have used dir -AH to see if the git directory is hidden, but there is none. Why do I not get a git skeleton directory? And where, exactly are the added (staged) files put?

Answer

multigoodverse picture multigoodverse · Oct 28, 2015

On Windows, git init may create a hidden .git folder. Go to Organize --> Files and Search Options --> and then check Show Hidden Files. That will unveil the .git folder.