Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I love my GitBash window because it helps maintain the illusion that I am not on Windows 7. I can type ls /c/ and see C:/. This has worked fine for me. Now I would like to create a git backup on an external drive that is not underneath C:. I plug in the drive, Windows assigned it "G:" but now, how do I tell Mingw32 to know about it?

I'd like to use $ git remote add backup /tmp/backup from this excellent answer but change /tmp to G:

$ git remote add backup /G/myrepo  ...
$ git push backup
fatal: 'C:/prog/Git/G/myrepo' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I'm not sure what information is useful.

$ git --version
git version
$ ls G:
ls: G:: No such file or directory
share|improve this question

migrated from Oct 3 '11 at 15:34

This question came from our site for professional and enthusiast programmers.

Why are you fighting your OS? – SLaks Oct 3 '11 at 15:34
you are aware that by adding the git bin dir to the PATH you can just use cmd and type stuff like git remote add g:/myrepo ? – stijn Oct 3 '11 at 15:39
I'm not sure what you are saying. git's bin is in my PATH but I couldn't get "ls G:/" to work. Thanks. – user333947 Oct 3 '11 at 15:49
in the windows command line it's not ls but dir g: – stijn Oct 4 '11 at 6:42
up vote 8 down vote accepted

Go to Disk Management in Computer Management, right-click the drive in question, click Change Drive Letters and Paths, and mount it to a folder in your C: drive.

share|improve this answer
thank you. I don't want to tell you how long I googled around to try to figure this out. – user333947 Oct 3 '11 at 15:47
You're welcome. You should accept this answer by clicking the hollow check. – SLaks Oct 3 '11 at 15:48

Git Bash doesn't dynamically "mount" drives, so you need to close all Git Bash instances, then start a new instance. It should then appear under /g.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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