git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: A question about changing remote repo name

From
RSRussell Steicke <russellsteicke@gmail.com>
Date
Jan 5, 2010, 02:52 UTC
Message-ID
<c1b8b6671001041852w4740b7d6g4b8db1221c5dc744@mail.gmail.com>
In-Reply-To
<60ce8d251001032245n4e0267b1o1ecc796f324f8179@mail.gmail.com>
On Mon, Jan 4, 2010 at 2:45 PM, Dongas <dongas86@gmail.com> wrote:
Show 5 quoted lines
> So i need to change the remote name manually.
>
> I tried modifying the .git/config file locally but it didn't work.
>
> Could someone help tell how to do it?
After editing .git/config, do this:
$ mv .git/refs/remotes/OLDNAME .git/refs/remotes/NEWNAME
and optionally:
$ mv .git/logs/refs/remotes/OLDNAME .git/logs/refs/remotes/NEWNAME

Remember to rename the remote in any tracking branches in .git/config, as well as the name in the [remote "OLDNAME"] section, and the name in any fetch and push lines. ie

[remote "OLDNAME"]
	url = something
	fetch = +refs/heads/*:refs/remotes/OLDNAME/*
[branch "master"]
	remote = OLDNAME
	merge = refs/heads/master
Becomes
[remote "NEWNAME"]
	url = something
	fetch = +refs/heads/*:refs/remotes/NEWNAME/*
[branch "master"]
	remote = NEWNAME
	merge = refs/heads/master
-- 
Virus found in this message.
Previous: DongasNext: Dongas
Message 6 of 14 in “A question about changing remote repo name”
  1. DongasJan 4, 2010
  2. Miklos VajnaJan 4, 2010
  3. DongasJan 5, 2010
  4. Erik Faye-LundJan 5, 2010
  5. DongasJan 5, 2010
  6. Russell SteickeJan 5, 2010
  7. DongasJan 5, 2010
  8. David AguilarJan 5, 2010
  9. DongasJan 6, 2010
  10. Russell SteickeJan 6, 2010
  11. Johannes SchindelinJan 6, 2010
  12. Russell SteickeJan 7, 2010
  13. Junio C HamanoJan 6, 2010
  14. DongasJan 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.