7

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 1.7.0.2.msysgit.0
$ ls G:
ls: G:: No such file or directory
user333947
  • 73
  • 1
  • 3

2 Answers2

9

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.

SLaks
  • 7,944
  • 2
  • 36
  • 59
  • thank you. I don't want to tell you how long I googled around to try to figure this out. – user333947 Oct 03 '11 at 15:47
  • You're welcome. [You should accept this answer by clicking the hollow check](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). – SLaks Oct 03 '11 at 15:48
6

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.

Source: http://comments.gmane.org/gmane.comp.version-control.msysgit/13133

joshdoe
  • 161
  • 1
  • 1