Avatar of Mike Eghtebas
Mike Eghtebas
Flag for United States of America asked on

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?
Version ControlGitPowershell

Avatar of undefined
Last Comment
mrwad99

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
mrwad99

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike Eghtebas

ASKER
Yes now I see it in command prompt. Do you by any chance you know what the same command in powershell is?
mrwad99

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 Eghtebas

ASKER
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

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
mrwad99

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>