git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell Steicke <russellsteicke@gmail.com>
To: Dongas <dongas86@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: A question about changing remote repo name
Date: Tue, 5 Jan 2010 10:52:46 +0800	[thread overview]
Message-ID: <c1b8b6671001041852w4740b7d6g4b8db1221c5dc744@mail.gmail.com> (raw)
In-Reply-To: <60ce8d251001032245n4e0267b1o1ecc796f324f8179@mail.gmail.com>

On Mon, Jan 4, 2010 at 2:45 PM, Dongas <dongas86@gmail.com> wrote:
> 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.

  parent reply	other threads:[~2010-01-05  3:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  6:45 A question about changing remote repo name Dongas
2010-01-04 20:09 ` Miklos Vajna
2010-01-05  1:53   ` Dongas
2010-01-05  1:57     ` Erik Faye-Lund
2010-01-05  2:25       ` Dongas
2010-01-05  2:52 ` Russell Steicke [this message]
2010-01-05  4:30   ` Dongas
2010-01-05 21:15     ` David Aguilar
2010-01-06  3:55       ` Dongas
2010-01-06  0:07     ` Russell Steicke
2010-01-06  0:27       ` Johannes Schindelin
2010-01-07  1:53         ` Russell Steicke
2010-01-06  1:02       ` Junio C Hamano
2010-01-06  3:58       ` Dongas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1b8b6671001041852w4740b7d6g4b8db1221c5dc744@mail.gmail.com \
    --to=russellsteicke@gmail.com \
    --cc=dongas86@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).