Git: Internal error: refs/remotes/origin/master is not a valid packed reference

For future readers who are trying to use GitExtensions and getting this error: David C's answer works for our purposes as well, and you can type in file:// before the 'Repo to clone' location name.

This error arises when the Repo to clone and destination directory are both on a local network drive.

enter image description here


When cloning to a mapped network drive using a standard Windows command prompt, you need to preface the from path with file://.

E.g.,

git clone file://x:\code\repos\project.git

or, if there are spaces,

git clone "file://x:\my code\repos\project.git"

You cannot, however, do the same when specifying the target.

** DOESN'T WORK **
git clone file://x:\code\repos\project.git file://y:\code\source\project

Instead,

cd y:\code\source
git clone file://x:\code\repos\project.git project

Tags:

Windows

Git