* Newbie questions about moving around repositories
@ 2007-06-15 13:52 Ed Schofield
2007-06-15 14:18 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Ed Schofield @ 2007-06-15 13:52 UTC (permalink / raw)
To: git
Hi all,
I've recently started using git to manage my own patchsets for a
public CVS repository that I don't have write access to. I have a
couple of newbie questions, please:
1. I would like to move my repository (including all branches) from
directory A to a directory B on a different filesystem. Can I use
git-clone for this? It seems that git-clone creates remote-tracking
branches, but I want to keep all of the branches as local branches so
I can remove the original repository.
2. I can't just move the entire directory A, because I get
Error in startup script: error: object directory
A/../A-cvs-git/.git/objects does not exist; check
.git/objects/info/alternates
I think I originally created the repository by cloning from my
A-cvs-git/ directory with git-clone --shared, but I don't quite
remember. So I suppose I want a way to stop using the alternates
mechanism and make my repository self-contained in one directory. Is
this possible? Will I then be free to move the directory?
I'd appreciate any advice!
-- Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie questions about moving around repositories
2007-06-15 13:52 Newbie questions about moving around repositories Ed Schofield
@ 2007-06-15 14:18 ` Alex Riesen
2007-06-15 17:19 ` Ed Schofield
0 siblings, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2007-06-15 14:18 UTC (permalink / raw)
To: Ed Schofield; +Cc: git
On 6/15/07, Ed Schofield <edschofield@gmail.com> wrote:
> 1. I would like to move my repository (including all branches) from
> directory A to a directory B on a different filesystem. Can I use
> git-clone for this? It seems that git-clone creates remote-tracking
> branches, but I want to keep all of the branches as local branches so
> I can remove the original repository.
Just copy it.
> 2. I can't just move the entire directory A, because I get
>
> Error in startup script: error: object directory
> A/../A-cvs-git/.git/objects does not exist; check
> .git/objects/info/alternates
... but fix that .git/objects/info/alternates files in the repos left to
point to the new location of the moved directory.
> I think I originally created the repository by cloning from my
> A-cvs-git/ directory with git-clone --shared, but I don't quite
> remember. So I suppose I want a way to stop using the alternates
> mechanism and make my repository self-contained in one directory. Is
> this possible?
git repack -f, and remove the alternates, probably.
Otherwise you can just copy .git/objects directory into all
related repos, remove alternates there and you're free.
> Will I then be free to move the directory?
Yes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie questions about moving around repositories
2007-06-15 14:18 ` Alex Riesen
@ 2007-06-15 17:19 ` Ed Schofield
2007-06-15 21:58 ` Alex Riesen
0 siblings, 1 reply; 4+ messages in thread
From: Ed Schofield @ 2007-06-15 17:19 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
On 6/15/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 6/15/07, Ed Schofield <edschofield@gmail.com> wrote:
> > 1. I would like to move my repository (including all branches) from
> > directory A to a directory B on a different filesystem.
> > [snip]
>
> Just copy it.
> [snip]
> ... but fix that .git/objects/info/alternates files in the repos left to
> point to the new location of the moved directory.
Thanks, Alex! Changing this and .git/branches/origin worked a treat.
-- Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie questions about moving around repositories
2007-06-15 17:19 ` Ed Schofield
@ 2007-06-15 21:58 ` Alex Riesen
0 siblings, 0 replies; 4+ messages in thread
From: Alex Riesen @ 2007-06-15 21:58 UTC (permalink / raw)
To: Ed Schofield; +Cc: git
Ed Schofield, Fri, Jun 15, 2007 19:19:58 +0200:
> On 6/15/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> >On 6/15/07, Ed Schofield <edschofield@gmail.com> wrote:
> >> 1. I would like to move my repository (including all branches) from
> >> directory A to a directory B on a different filesystem.
> >> [snip]
> >
> >Just copy it.
> >[snip]
> >... but fix that .git/objects/info/alternates files in the repos left to
> >point to the new location of the moved directory.
>
>
> Thanks, Alex! Changing this and .git/branches/origin worked a treat.
>
.git/branches is obsoleted. Branch configuration is in .git/config now
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-15 21:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-15 13:52 Newbie questions about moving around repositories Ed Schofield
2007-06-15 14:18 ` Alex Riesen
2007-06-15 17:19 ` Ed Schofield
2007-06-15 21:58 ` Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox