I just ran the following commands on my Ruby on Rails project:
git init
git add .
git commit -a -m \'Initial\'
Where does Git actually stor
In a .git directory in the root of the project. Unlike some other version control systems, notably CVS, there are no additional directories in any of the subdirectories.
I also couldn't find my git repository. I am using Windows 8 and created my repository (by mistake) under C:\Program Files (x86)\Git
. I could see the repository folder in bash but not in cmd or Windows Explorer.
Then I remembered about Windows's "Virtual Store" feature. My repository folder was actually created under C:\Users\<username>\AppData\Local\VirtualStore\Program Files (x86)\Git\<myrepo>
and in there was my .git
folder!
If you are looking for where the project folder was created. I noticed when I typed in the git bash.
$ git init projectName
it will tell me, where the project folder is for that project.
I'm on Windows and found my location by right clicking the Git Bash program in my Start menu and selecting Properties. The Shortcut tab shows the "Start in:" value. For me, it was %HOMEDRIVE%%HOMEPATH%
, so I opened a CMD prompt and typed echo %HOMEDRIVE%%HOMEPATH%
to see the actual location.