[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Git question. Is there a way of duplicating a git repository?
From: |
Alan Mackenzie |
Subject: |
Re: Git question. Is there a way of duplicating a git repository? |
Date: |
Sun, 15 Nov 2015 10:33:40 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, Ken.
On Sat, Nov 14, 2015 at 04:02:27PM -0500, Ken Brown wrote:
> On 11/14/2015 6:20 AM, Alan Mackenzie wrote:
> > Hello, Emacs.
> > Now that we've cut the emacs-25 release branch, I'd like to have a
> > distinct repository for this.
> > I could simply download another copy from savannah, but this would
> > (presumably) be a distinct copy, rather than hard linking the repository
> > files. This would cost me disk (and backup) space.
> > Or I could clone my master repository to make emacs-25. But this would
> > make the new repo firmly subordinate to the master repo, rather than
> > directly with savannah.
> You can fix that by issuing the following command in the new repo:
> git remote set-url origin <userid>@git.sv.gnu.org:/srv/git/emacs.git master
> After doing that, you'll to do 'git pull' in order to bring in the remote
> branches, and then you can do 'git checkout emacs-25'.
First of all, many thanks for actually addressing the question I asked.
;-)
What I did in the end was to clone a new repo with the --mirror argument
(so as to copy all the branches, rather than creating new ones pointing
at the original repo), and manually edited .../.git/config so as to get
working directories. Then I changed the remote origin url in that file
by hand.
Having done "git checkout", I was then able to "git pull" from savannah,
and switch to branch emacs-25 with another "git checkout".
So, I'm where I want to be!
Thanks again.
> Ken
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Git question. Is there a way of duplicating a git repository?, (continued)
- Re: Git question. Is there a way of duplicating a git repository?, Liang Wang, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, Ivan Shmakov, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, David Reitter, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, chris . nixon, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, John Wiegley, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, Andreas Schwab, 2015/11/15
- Re: Git question. Is there a way of duplicating a git repository?, Andy Moreton, 2015/11/16
- Re: Git question. Is there a way of duplicating a git repository?, Ken Brown, 2015/11/16
- Re: Git question. Is there a way of duplicating a git repository?,
Alan Mackenzie <=
- Re: Git question. Is there a way of duplicating a git repository?, Mike Gerwitz, 2015/11/16
- Re: Git question. Is there a way of duplicating a git repository?, Paul Eggert, 2015/11/16
- Re: Git question. Is there a way of duplicating a git repository?, Steinar Bang, 2015/11/16