How to remove invalid remote repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I mistakenly entered the wrong directory name for "git remote add" (I
entered the working tree directory name instead of the ".git" directory
name). 

So "git fetch" fails with:

fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

Cannot get the repository state from origin

So, I tried removing the remote tracking branches:

git branch -d -r root-etc/master

But that failed with:

error: remote branch 'root-etc/master' not found.


So I then tried recreating the remote reference:

git remote add root-etc /root/git/etc/.git
But that failed with:

remote root-etc already exists

So, how can I remove the incorrect remote repository reference and
replace it with a correct one?

[root@demo5 etc]# git config -l
core.repositoryformatversion=0

core.filemode=true

core.bare=false

core.logallrefupdates=true

gui.geometry=811x591+781+0 107 172

remote.root-etc.url=/root/git/etc

remote.root-etc.fetch=+refs/heads/*:refs/remotes/root-etc/*

[root@demo5 etc]# git version

git version 1.5.0.7
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux