Git: Where is my local repository? (no .git directory)

All of the results I find say that the local repository is in a folder called ".git", and that this folder can be found within the working directory folder. However, I have no such folder. I've done a search and apparently there is no .git folder on my entire PC.

Context: I have been using the git CLI on my Windows 10 laptop to manage a repository that is stored on Github. To push my changes, I always do the following:

git add .
git commit -m "lorem ipsum"
git push origin master

This seems to be working, as I see my work on Github, and I have been able to revert local changes using

git reset --hard

Any suggestions are greatly appreciated.

Upvotes: 3

Views: 17536

Answers (2)

Code on the Rocks
Code on the Rocks

Reputation: 17624

For MacOS Users

  1. Go to Finder
  2. Navigate to app directory
  3. Press Cmd + Shift + .

This should show you the hidden .git folder

Upvotes: 2

vivek verma
vivek verma

Reputation: 1766

.git is a hidden folder. You will need to view hidden folders in your OS of choice to see it.

On Windows:

  1. Go to explorer
  2. Select Organise
  3. Select Folder and Search Options
  4. Select View tab
  5. Check Show hidden files, folders and drives.

This should show you the hidden .git folder

Upvotes: 9

Related Questions