* Moving git
@ 2009-10-16 14:58 Richard Lee
2009-10-16 15:17 ` Matthieu Moy
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Richard Lee @ 2009-10-16 14:58 UTC (permalink / raw)
To: git
Hi Git forum,
I've just started using git yesterday, so I'm very new. So please excuse if
I've done something the wrong way.
I cloned a git directory/repository? and then moved it. I'm trying to prune
branches and it gives
]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or not a
git archive
fatal: The remote end hung up unexpectedly
ls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command returned
error: 1
b2.git was the cloned bare thing I create following the instruction here:
http://book.git-scm.com/4_setting_up_a_private_repository.html
Is there someway I can get git to update the git base directory?
Richard
--
View this message in context: http://www.nabble.com/Moving-git-tp25926819p25926819.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 14:58 Moving git Richard Lee
@ 2009-10-16 15:17 ` Matthieu Moy
2009-10-16 15:45 ` Richard
2009-10-16 15:41 ` Santi Béjar
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Matthieu Moy @ 2009-10-16 15:17 UTC (permalink / raw)
To: Richard Lee; +Cc: git
Richard Lee <richard@webdezign.co.uk> writes:
> Hi Git forum,
>
> I've just started using git yesterday, so I'm very new. So please excuse if
> I've done something the wrong way.
>
> I cloned a git directory/repository? and then moved it. I'm trying to prune
> branches and it gives
Which command did you type?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 14:58 Moving git Richard Lee
2009-10-16 15:17 ` Matthieu Moy
@ 2009-10-16 15:41 ` Santi Béjar
2009-10-16 17:04 ` Richard Lee
2009-10-20 16:33 ` Daniel Barkalow
3 siblings, 0 replies; 11+ messages in thread
From: Santi Béjar @ 2009-10-16 15:41 UTC (permalink / raw)
To: Richard Lee; +Cc: git
On Fri, Oct 16, 2009 at 4:58 PM, Richard Lee <richard@webdezign.co.uk> wrote:
> I cloned a git directory/repository? and then moved it.
So you moved the original repository. Then you have to update the url
in the new/cloned repositories. I would edit .git/config and changed
the url entries with the new value.
HTH,
Santi
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Moving git
2009-10-16 15:17 ` Matthieu Moy
@ 2009-10-16 15:45 ` Richard
2009-10-16 16:11 ` Matthieu Moy
0 siblings, 1 reply; 11+ messages in thread
From: Richard @ 2009-10-16 15:45 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
Hi Matthieu,
Thanks for replying.
Basically, I used git-svn to import from git. I'm trying to get rid of
the origin branch. (I probably should have used the no-metdata switch).
The command I used was
git branch prune origin
I tried "git remote rm origin" which worked on my local win32 machine,
but the linux server I was working on did not recognise "git remote rm".
I'm pretty sure git stores the current git directory as I've seen the
--git-dir and --work-tree environment variables. Plus I also noticed on
msysgit gives " Local uncommitted changes, not checked in to index"
sometimes, when I move the directory.
Regards,
Richard
-----Original Message-----
From: Matthieu Moy [mailto:Matthieu.Moy@grenoble-inp.fr]
Sent: 16 October 2009 16:17
To: Richard
Cc: git@vger.kernel.org
Subject: Re: Moving git
Richard Lee <richard@webdezign.co.uk> writes:
> Hi Git forum,
>
> I've just started using git yesterday, so I'm very new. So please
excuse if
> I've done something the wrong way.
>
> I cloned a git directory/repository? and then moved it. I'm trying to
prune
> branches and it gives
Which command did you type?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 15:45 ` Richard
@ 2009-10-16 16:11 ` Matthieu Moy
0 siblings, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2009-10-16 16:11 UTC (permalink / raw)
To: Richard; +Cc: git
"Richard" <richard@webdezign.co.uk> writes:
> Hi Matthieu,
>
>
> Thanks for replying.
>
> Basically, I used git-svn to import from git. I'm trying to get rid of
> the origin branch. (I probably should have used the no-metdata switch).
>
> The command I used was
>
> git branch prune origin
>
> I tried "git remote rm origin" which worked on my local win32 machine,
> but the linux server I was working on did not recognise "git remote rm".
>
> I'm pretty sure git stores the current git directory as I've seen the
> --git-dir and --work-tree environment variables.
Git doesn't store them by default for the current repository. "git
rev-parse --git-dir" guesses where your .git/ directory is (looking
for ./.git/, ../.git, and so on). OTOH, Git stores URLs for remote
repositories (see .git/config).
> Plus I also noticed on msysgit gives " Local uncommitted changes,
> not checked in to index" sometimes, when I move the directory.
I don't know msysgit, but I guess you'll have problems if your
repository is on a FAT filesystem. Is it the case?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 14:58 Moving git Richard Lee
2009-10-16 15:17 ` Matthieu Moy
2009-10-16 15:41 ` Santi Béjar
@ 2009-10-16 17:04 ` Richard Lee
2009-10-16 17:10 ` Matthieu Moy
2009-10-16 18:42 ` Todd Zullinger
2009-10-20 16:33 ` Daniel Barkalow
3 siblings, 2 replies; 11+ messages in thread
From: Richard Lee @ 2009-10-16 17:04 UTC (permalink / raw)
To: git
Hi all,
Thank you to Matthieu Moy and Santi Béjar who both told me to check
.git/config.
The reason why I had problems was because I was using git config --get-all
(with no regex). I then used git config -l and saw the remote local path to
the repository that I used to clone.
The reason I had problem with git remote rm was because I was using version
1.5.2 as I installed it from yum. (This is what I hate about CentOS, all the
repositories are old as dirt.) I compiled version 1.6.5 and the command was
there. I think the ability probably was there in 1.5.2, but you probably had
to do some extra magic stuff to completely remove the repository. And by
trying to git remote prune didn't help either as I had deleted the local
repository.
I now could "git remote rm origin" with no problems after moving the whole
git directory.
Richard
--
View this message in context: http://www.nabble.com/Moving-git-tp25926819p25928820.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 17:04 ` Richard Lee
@ 2009-10-16 17:10 ` Matthieu Moy
2009-10-16 18:42 ` Todd Zullinger
1 sibling, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2009-10-16 17:10 UTC (permalink / raw)
To: Richard Lee; +Cc: git
Richard Lee <richard@webdezign.co.uk> writes:
> The reason I had problem with git remote rm was because I was using version
> 1.5.2 as I installed it from yum. (This is what I hate about CentOS, all the
> repositories are old as dirt.) I compiled version 1.6.5 and the command was
> there.
It's a good idea to have a recent version of Git. The
user-friendlyness of Git is progressing quickly, and each new version
brings a myriad of little details that will make your life easier
while learning Git ;-).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 17:04 ` Richard Lee
2009-10-16 17:10 ` Matthieu Moy
@ 2009-10-16 18:42 ` Todd Zullinger
2009-10-19 9:30 ` rhlee
1 sibling, 1 reply; 11+ messages in thread
From: Todd Zullinger @ 2009-10-16 18:42 UTC (permalink / raw)
To: Richard Lee; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
Richard Lee wrote:
> The reason I had problem with git remote rm was because I was using
> version 1.5.2 as I installed it from yum. (This is what I hate about
> CentOS, all the repositories are old as dirt.)
Not that it's much newer, but if you use the EPEL repository, 1.5.5.6
is available.
> I compiled version 1.6.5 and the command was there.
And if it helps, the Fedora package is intended to be able to build
cleanly on CentOS as well -- though it depends on some macro settings
available in the buildsys-macros package found at:
http://buildsys.fedoraproject.org/buildgroups/rhel5/
...in the proper directory for your architecture.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Every time I close the door on reality, it comes in through the
windows.
[-- Attachment #2: Type: application/pgp-signature, Size: 542 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 18:42 ` Todd Zullinger
@ 2009-10-19 9:30 ` rhlee
0 siblings, 0 replies; 11+ messages in thread
From: rhlee @ 2009-10-19 9:30 UTC (permalink / raw)
To: git
Thanks, I've been looking for something like EPEL for a long time.
--
View this message in context: http://n2.nabble.com/Moving-git-tp3836198p3848039.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Moving git
2009-10-16 14:58 Moving git Richard Lee
` (2 preceding siblings ...)
2009-10-16 17:04 ` Richard Lee
@ 2009-10-20 16:33 ` Daniel Barkalow
2009-10-20 16:37 ` Richard
3 siblings, 1 reply; 11+ messages in thread
From: Daniel Barkalow @ 2009-10-20 16:33 UTC (permalink / raw)
To: Richard Lee; +Cc: git
On Tue, 20 Oct 2009, Richard Lee wrote:
>
> Hi Git forum,
>
> I've just started using git yesterday, so I'm very new. So please excuse if
> I've done something the wrong way.
>
> I cloned a git directory/repository? and then moved it. I'm trying to prune
> branches and it gives
>
> ]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or not a
> git archive
> fatal: The remote end hung up unexpectedly
> ls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command returned
> error: 1
>
> b2.git was the cloned bare thing I create following the instruction here:
>
> http://book.git-scm.com/4_setting_up_a_private_repository.html
>
> Is there someway I can get git to update the git base directory?
The exact problem, I think, is that your clone has saved the original
location of the bare repository as the default upstream repository
location, and now it's not there. (It's a little hard to tell without the
command that you were running when you got the error.)
If you edit the clone's .git/config, you should see the old location in a
'[remote "origin"]' section. If you change this to the new location,
everything should work. You can also do it with "git remote" somehow, but
I personally just edit the config file, so I don't know the details.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Moving git
2009-10-20 16:33 ` Daniel Barkalow
@ 2009-10-20 16:37 ` Richard
0 siblings, 0 replies; 11+ messages in thread
From: Richard @ 2009-10-20 16:37 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: git
Thanks to anyone for the reply, but this issue has been resolved. I
might have submitted this several times, but Nabble keeps on nagging me
about multiple posts. So I'm just going to delete it.
-----Original Message-----
From: Daniel Barkalow [mailto:barkalow@iabervon.org]
Sent: 20 October 2009 17:34
To: Richard
Cc: git@vger.kernel.org
Subject: Re: Moving git
On Tue, 20 Oct 2009, Richard Lee wrote:
>
> Hi Git forum,
>
> I've just started using git yesterday, so I'm very new. So please
excuse if
> I've done something the wrong way.
>
> I cloned a git directory/repository? and then moved it. I'm trying to
prune
> branches and it gives
>
> ]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or
not a
> git archive
> fatal: The remote end hung up unexpectedly
> ls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command
returned
> error: 1
>
> b2.git was the cloned bare thing I create following the instruction
here:
>
> http://book.git-scm.com/4_setting_up_a_private_repository.html
>
> Is there someway I can get git to update the git base directory?
The exact problem, I think, is that your clone has saved the original
location of the bare repository as the default upstream repository
location, and now it's not there. (It's a little hard to tell without
the
command that you were running when you got the error.)
If you edit the clone's .git/config, you should see the old location in
a
'[remote "origin"]' section. If you change this to the new location,
everything should work. You can also do it with "git remote" somehow,
but
I personally just edit the config file, so I don't know the details.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-10-20 16:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 14:58 Moving git Richard Lee
2009-10-16 15:17 ` Matthieu Moy
2009-10-16 15:45 ` Richard
2009-10-16 16:11 ` Matthieu Moy
2009-10-16 15:41 ` Santi Béjar
2009-10-16 17:04 ` Richard Lee
2009-10-16 17:10 ` Matthieu Moy
2009-10-16 18:42 ` Todd Zullinger
2009-10-19 9:30 ` rhlee
2009-10-20 16:33 ` Daniel Barkalow
2009-10-20 16:37 ` Richard
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).