Newbie attempting to set up a local git repo

arcy
arcy
I have a network drive at home on which I'd like to set up some repositories for personal work. I found instructions that tell me to use the following commands: Let us call the network drive Y: (I'm on Windows 10 Pro), and the directory in which I'm going to put repositories "git". From the command line, default directory set to the parent of the repo to create: [CODE] y: cd /git git init --bare myrepo.git [/CODE] Then with the default directory set to the working directory for the code I will want to put in that repo: [CODE]git remote add origin y:\git\myrepo.git[/CODE] When I do this, git returns the message "fatal: not a git repository (or any of the parent directories): .git" I have tried with names that do not have ".git" in them. I have wiped the directories and done it over. I have tried it with slashes instead of backslashes; none of them work, all of them give the same error. What am I doing wrong?

Last updated

DougR
DougR
The last parameter to the "git remote add" is a URL. You've got a file system path. Prefix that by "file://" and see what happens.

1-2 of 2

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.

Post a reply
488 views