5picyLi5a 5picyLi5a -4 years ago 216
Git Question

Can't find local git repositories

Okay, so when I initialize a local repository using git init, I know that I created a repository. Because, I use the following command in git bash to find the repository that I just created:

find ~ -type d –name .git

And it finds the repository exactly as I thought. However, then when I go and try to navigate to that folder in using the change directory commands in git bash, none of the .git folders are showing up.

I give the command
to show the contents, and none of my repositories show up.

Why is this? Thanks very much.

Answer Source

Because your .git directory is hidden. To list all the files or directories including hidden ones, you need to run ls -a command.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download