From: Tomas Carnecky <tom@dbservice.com>
To: Hilco Wijbenga <hilco.wijbenga@gmail.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: Renaming a repo
Date: Tue, 19 Apr 2011 20:13:24 +0200 [thread overview]
Message-ID: <4DADD0C4.4010106@dbservice.com> (raw)
In-Reply-To: <BANLkTiknSbWrskhGLWUBEq1=9KV4hC3ttA@mail.gmail.com>
On 4/19/11 8:02 PM, Hilco Wijbenga wrote:
> Hi all,
>
> I have a hosted Git repo. As such I don't have the ability to touch
> the bare repo itself (should that be relevant). I would like to rename
> it though. I'd like to know if my approach below is valid.
>
> 1. The current repo is 'abc.git'
> 2. git clone abc.git
git clone --mirror abc.git
> 3. Create new hosted repo 'xyz.git'
cd abc; git push --mirror xyz.git
then you are done.
> 4. git clone xyz.git
> 5. Copy abc/{.git,*} into xyz/
> 6. Replace all occurrences of 'abc.git' with 'xyz.git':
> 6.a. .git/logs/HEAD:00...00 41..53 Hilco Wijbenga<...> 1299100781
> -0800 clone: from git@...:abc.git
You can ignore the reflog.
> 6.b. .git/logs/refs/heads/master:00...00 41...53 Hilco Wijbenga<...>
> 1299100781 -0800 clone: from git@...:abc.git
> 6.c. .git/config: url = git@...:abc.git
> 6.d. .git/FETCH_HEAD:41...53 branch 'master' of ...:abc
> 7. git push origin master
FETCH_HEAD is also mostly irrelevant, as next time you fetch it'll be
overwritten.
> There are no errors or warnings and a subsequent git clone and git log
> also seem to work. Is the repo in a consistent state or will I
> experience problems in the future?
No idea. But what you did seems much more complicated than necessary.
tom
next prev parent reply other threads:[~2011-04-19 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 18:02 Renaming a repo Hilco Wijbenga
2011-04-19 18:13 ` Tomas Carnecky [this message]
2011-04-19 18:32 ` Hilco Wijbenga
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=4DADD0C4.4010106@dbservice.com \
--to=tom@dbservice.com \
--cc=git@vger.kernel.org \
--cc=hilco.wijbenga@gmail.com \
/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).