25

When I open Git Bash on Windows 7, the default directory is /. It has *nix-style subdirectories, and cd .. doesn't change the directory. Where is this directory on my Windows machine?

The directory C:\Program Files\Git\ has similar contents, except that / has a proc subdirectory, and C:\Program Files\Git\ doesn't.

I put dir /s /a git-bash.exe in cmd.exe, and it only came up with the git-bash.exe in C:\Program Files\Git, no other one (such as the one in /).

  • 7
    Try running mount in the the bash shell. – DavidPostill Mar 26 '17 at 17:54
  • 1
    @LazyBadger OK so according to Git Bash Properties (I right-clicked on Git Bash), it starts in C:\Program Files\Git\ . This still doesn't answer why / has a proc subdirectory and C:\Program Files\Git\ doesn't. Do you know? – Joshua Meyers Mar 27 '17 at 5:05
  • @DavidPostill Thanks, this also corroborates this. mount gives the line: C:/Program Files/Git on / type ntfs (binary,noacl,auto). But why does / have a proc subdirectory that C:\Program FIles\Git\ doesn't have then? – Joshua Meyers Mar 27 '17 at 5:08
  • 1
    Again: tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html "/proc is very special in that it is also a virtual filesystem. It's sometimes referred to as a process information pseudo-file system. It doesn't contain 'real' files but runtime system information (e.g. system memory, devices mounted, hardware configuration, etc)." – Lazy Badger Mar 27 '17 at 8:39
37

In Git Bash, open Windows Explorer with this command:

explorer .

You will then see your current directory in the explorer address bar

| improve this answer | |
  • 4
    excellent answer : simple and actually works for any folder. With this I discovered that /tmp was mounted for c:/users/[my winuser]/[local app data folder]/temp – Pacopaco Jun 12 '19 at 7:48
5

You can run cmd from the current directory in Git Bash. That will start a windows cmd shell, which will show the windows path in the command prompt. Then type exit to return to Git Bash.

For example:

$ cmd
Microsoft Windows ...

C:\Program Files\Git>

(This is also a quick way to convert unix path to windows path.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.