1

relatively inexperienced git user here, but I have an issue where the command git remote -v is not returning any information about the git repository that I forked from GitHub. I have .git running in the folder and it is an exact replica of the one I have in my GitHub account. The original was forked from a coding school (the files contain practice problems). Right now I'm trying to push back to the repository but that isn't working either.

Any help would be greatly appreciated!

ErinL
  • 13
  • 4
  • 1
    Does `git remote -v` show any error messages? Also, "*that isn't working either.*" -- any error messages? Also, what command did you use to *clone* repository locally? – costaparas Dec 13 '20 at 01:10
  • When I initially tried to push back to the repository, it looked liked the files moved over but there was no evidence on the GitHub side (no changes, new time stamps, etc). I used git clone + the http address of the forked repository. Thanks! – ErinL Dec 13 '20 at 01:41
  • no error messages from git remote -v, just started a new command line – ErinL Dec 13 '20 at 01:47

1 Answers1

0

Try again and clone your fork with a git clone https://github.com/<me>/<myfork>

Then go into the myfork folder created by the git clone, and check that git remote -v does return the correct origin URL.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks! I did this and but after asking for ls -a, I don't see a myfork folder. Hmm. – ErinL Dec 13 '20 at 01:36
  • @ErinL Which OS are you using? Which shell? And which Git version? – VonC Dec 13 '20 at 01:37
  • I'm running Catalina, git version 2.24.3, terminal – ErinL Dec 13 '20 at 01:42
  • sorry, zsh might be what you wanted to know, re: shell – ErinL Dec 13 '20 at 01:44
  • @ErinL Can you activate "showing hidden files" (https://stackoverflow.com/a/56057761/6309) and see if can find your cloned folder then? – VonC Dec 13 '20 at 01:46
  • Just tried - looked in new cloned folder and I don't see myfork! – ErinL Dec 13 '20 at 02:05
  • @ErinL And in your original local fork (the one where `git remote -v` returns nothing) do you see a `.git` subfolder? – VonC Dec 13 '20 at 02:09
  • I do, yes - I have a git folder in both the folder that contains the forked project and the folder that it's in. – ErinL Dec 13 '20 at 14:15
  • @ErinL and the folder that it's in"? there should be only one .git folder under your local cloned fork. Not `.git/.git` – VonC Dec 13 '20 at 14:16
  • Sorry, I think I might have misunderstood - I cloned the repository again, but did you want me to literally copy https://github.com//? I just tried that in terminal but got an error message : zsh: parse error near `\n' – ErinL Dec 13 '20 at 14:19
  • @ErinL You should cloned in a separate folder, outside of any existing local Git repository. – VonC Dec 13 '20 at 14:20
  • @ErinL I have an errand to make. I will be back in a few hours. – VonC Dec 13 '20 at 14:20
  • There's no git folder within the git folder. I just meant that I have git running one cd level up as well. I could get rid of it if it's unnecessary. – ErinL Dec 13 '20 at 14:20
  • no problem, sorry this issue is so annoying! – ErinL Dec 13 '20 at 14:21
  • What do you know, git remote -v is running now, on this new clone. VonC thanks for your patience and help. I will just copy files over and get rid of the old one. – ErinL Dec 13 '20 at 14:24