• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

where is .git after git init

PS C:\Users\Mike\gitCode\gitTest1> git init
Initialized empty Git repository in C:/Users/Mike/gitCode/gitTest1/.git/
PS C:\Users\Mike\gitCode\gitTest1> dir

After dir command, I was expecting to see .git in this folder but I cannot see it here.

Question: Where is  .git file?

Is it a hidden file? If so, how can I make it visible so I can verify it is there?
Mike Eghtebas
Mike Eghtebas
  • 3
  • 2
1 Solution
Run the command dir /a (to show all files) and you should see the directory.

Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Yes now I see it in command prompt. Do you by any chance you know what the same command in powershell is?
It's not as easy in Powershell unfortunately.  There is a (fairly old, now) blog post at http://blogs.msdn.com/b/powershell/archive/2009/03/13/dir-a-d.aspx which talks about how you can achieve roughly the same thing.  

Do you really need to use Powershell?
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
I will take a look at it. I have windows 7 and powershell comes with it.

What do you suggest to use?

BTW, this is what I get with dr/w in ps:
PS C:\Users\Mike\gitCode\gitTest1> dir/w
The term 'dir/w' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path wa
s included, verify that the path is correct and try again.
At line:1 char:6
+ dir/w <<<< 
    + CategoryInfo          : ObjectNotFound: (dir/w:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Open in new window

Why do you need to use Powershell?  What is it that you are trying to achieve by using it?  Do you simply need to test for the presence of the .git file?  I ask as there is most likely another way to achieve what you require...

<That's me out for the night, back tomorrow GMT>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now