How do I get rid of a cloned repo, within another repo? #21633
-
I just made a boneheaded mistake. I was in a local repo, where the remote is on GitHub. (However, in this case I’ve not committed the change locally nor have I pushed it to GitHub.) I wasn’t paying attention to the fact that I was already in a local repo. I went to GitHub to clone a repo I forked about 15 minutes previously. I got the URL and cloned it within the repo I was already in. Then, I realized the mistake I’ve made. I’ve tried entering a How do I either undo the repo within a repo, or delete it from the repo I put it in? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Move the inner repo directory to a “proper” location? I think you’re over thinking things. |
Beta Was this translation helpful? Give feedback.
-
I hadn’t thought of that. However, I’ve already cloned the repo again to a different, proper location. So, all I need to do is get rid of that inner repo. |
Beta Was this translation helpful? Give feedback.
-
Just do a regular deletion for your platform (e.g. |
Beta Was this translation helpful? Give feedback.
Just do a regular deletion for your platform (e.g.
rm -rf
on a Unix-ish one).git rm
doesn’t work because that second repo isn’t part of the enclosing one, so there’s nothing to remove from it.