Re: How to remove invalid remote repository

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

 



On Tue, Jun 05, 2007 at 14:41:04 -0500, Matt Seitz wrote:
> I mistakenly entered the wrong directory name for "git remote add" (I
> entered the working tree directory name instead of the ".git" directory
> name). 

There does not seem to be any 'git remote remove'. So you'll do it by
changing the config. Either with git-config, or by editing .git/config (it
*IS* meant to be hand-edited).

> [...]
> So, how can I remove the incorrect remote repository reference and
> replace it with a correct one?
> 
> [root@demo5 etc]# git config -l
> [...]
> remote.root-etc.url=/root/git/etc
                      ^^^^^^^^^^^^^
This is the URL. You can simply fix it either with 
    git-config remote.root-etc.url /root/git/etc/.git
or by editing
.git/config

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

The section corresponding to these two entries in .git/config looks like:

[remote "root-etc"]
url = /root/git/etc
fetch = +refs/heads/*:refs/remotes/root-etc/*

You can tweak it to your heart's content. The documentation is in man pages
of git-config and git-fetch.

-- 
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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