This is very close to both Is there a command to undo git init? and How to fully delete a git repository created with init? Unfortunately, the accepted answers do not fit well because I init
'd my home directory. (I missed a cd
, and then issued git init
).
Now, when I try to clone at my home directory, git just hangs and then time's out:
$ git clone -v https://gtihub.com/weidai11/cryptopp cryptopp-docs
Cloning into 'cryptopp-docs'...
fatal: unable to access 'https://gtihub.com/weidai11/cryptopp/': Connection timed out after 300043 milliseconds
The web interface is fine during this timeout period. I can navigate the project, examine commits, etc. I can also clone the same repo from another machine.
I want to avoid blowing out my other configuration information housed in the ~/.git
folder.
How do I fix a git init
issued from the wrong directory without deleting the .git
folder?
Here's what I am seeing in the home directory:
$ ls -Al | grep '.*git*'
drwxr-xr-x 10 jwalton staff 340 Sep 11 18:51 .git
-rw-r--r-- 1 jwalton staff 83 Jun 16 03:29 .gitconfig
And git is showing a bunch of untracked files from the home directory:
$ cd ~
$ git status -s | wc -l
91