1

I was wondering if someone could give me some advice on how to use git with network drives that change.

I had to copy the directory containing all of my source files to a network drive and now when I use anything pertaining to git I get the error fatal: Could not switch to 'W:/': No such file or directory

Is there a way to change the location that git is pointing to?

Did I not setup my git repository correctly?

kevorski
  • 816
  • 1
  • 11
  • 29

1 Answers1

0

you can view your git remotes by using

$ git remote -v

This will output something like this:

origin  git@host:user/repo.git (fetch)
origin  git@host:user/repo.git (push)

You can change this remote by deleting it, then recreating it with your proper remote

$ git remote rm origin
$ git remote add origin git@myhost:user/repo.git

Or more simply

$ git remote set-url origin git@myhost:user/repo.git
ddavison
  • 28,221
  • 15
  • 85
  • 110