git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hilco Wijbenga <hilco.wijbenga@gmail.com>
To: Git Users <git@vger.kernel.org>
Subject: Renaming a repo
Date: Tue, 19 Apr 2011 11:02:36 -0700	[thread overview]
Message-ID: <BANLkTiknSbWrskhGLWUBEq1=9KV4hC3ttA@mail.gmail.com> (raw)

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
3. Create new hosted repo 'xyz.git'
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
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

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?

Cheers,
Hilco

             reply	other threads:[~2011-04-19 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 18:02 Hilco Wijbenga [this message]
2011-04-19 18:13 ` Renaming a repo Tomas Carnecky
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='BANLkTiknSbWrskhGLWUBEq1=9KV4hC3ttA@mail.gmail.com' \
    --to=hilco.wijbenga@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).