I'm new to Git, when I run git init
in the terminal there's no .git directory created, however i get this result Reinitialized existing Git repository in /Users/Desktop/Javascript/sotrustme/.git/
please help me
As others already mentioned, the .git
directory is hidden from normal view, by virtue of being named .git
. Files and directories with names starting with .
are normally not displayed, to keep things uncluttered.
There's one other important point:
... I get this result
Reinitialized existing Git repository in ...
(the boldface is of course mine here). This means you already have a Git repository. Your git init
is not wiping it out, it's just checking that it looks like a valid Git repository, and making sure any template-specific hooks are set up. (This last part does not affect you: it would only matter if you ran git init --template=<some alternate template directory>
.)
It should be a hidden folder.
Try to display the hidden folders and you should be able to see it.
Use ls -al
to view all the hidden files and folders and their properties.
git init
Will create a .git folder (which is .) means a hidden folder.
The error
Reinitialized existing Git repository in /Users/Desktop/Javascript/sotrustme/.git/
This means .git already exist in your Present Working Directory. You can view the .git folder (and all hidden files and folders) by this command
ls -a
You can run git status
to check status, if it works git is initialized and working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With