No announcement yet.

Newbie attempting to set up a local git repo

  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie attempting to set up a local git repo

    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:

    cd /git
    git init --bare myrepo.git
    Then with the default directory set to the working directory for the code I will want to put in that repo:

    git remote add origin y:\git\myrepo.git
    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 edited by arcy; 04-20-2020, 09:57 PM.

  • #2
    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.