{"thread":{"id":"21262","subject":"Moving git","startedAt":"2009-10-16T14:58:47Z","lastAt":"2009-10-20T16:37:12Z","messageCount":11,"participants":["Richard Lee","Matthieu Moy","Santi Béjar","Richard","Todd Zullinger","rhlee","Daniel Barkalow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125183","messageId":"25926819.post@talk.nabble.com","threadId":"21262","inReplyTo":null,"subject":"Moving git","fromName":"Richard Lee","fromEmail":"richard@webdezign.co.uk","sentAt":"2009-10-16T14:58:47Z","receivedAt":"2009-10-16T14:58:47Z","isPatch":false,"sender":{"key":"richard@webdezign.co.uk","avatar":"https://gravatar.com/avatar/36c0bc285b2d30baa54ed2e1488161fd27a4a4a8128836a673b66204ab08c9b7?d=mp&s=160"},"body":"\nHi Git forum,\n\nI've just started using git yesterday, so I'm very new. So please excuse if\nI've done something the wrong way.\n\nI cloned a git directory/repository? and then moved it. I'm trying to prune\nbranches and it gives\n\n]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or not a\ngit archive\nfatal: The remote end hung up unexpectedly\nls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command returned\nerror: 1\n\nb2.git was the cloned bare thing I create following the instruction here:\n\nhttp://book.git-scm.com/4_setting_up_a_private_repository.html\n\nIs there someway I can get git to update the git base directory?\n\nRichard\n\n-- \nView this message in context: http://www.nabble.com/Moving-git-tp25926819p25926819.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"125185","messageId":"vpqk4yv2ws6.fsf@bauges.imag.fr","threadId":"21262","inReplyTo":"25926819.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-10-16T15:17:29Z","receivedAt":"2009-10-16T15:17:29Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Richard Lee <richard@webdezign.co.uk> writes:\n\n> Hi Git forum,\n>\n> I've just started using git yesterday, so I'm very new. So please excuse if\n> I've done something the wrong way.\n>\n> I cloned a git directory/repository? and then moved it. I'm trying to prune\n> branches and it gives\n\nWhich command did you type?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"125186","messageId":"adf1fd3d0910160841h513dea5ag6f9ace400afd1c2e@mail.gmail.com","threadId":"21262","inReplyTo":"25926819.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2009-10-16T15:41:40Z","receivedAt":"2009-10-16T15:41:40Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Fri, Oct 16, 2009 at 4:58 PM, Richard Lee <richard@webdezign.co.uk> wrote:\n> I cloned a git directory/repository? and then moved it.\n\nSo you moved the original repository. Then you have to update the url\nin the new/cloned repositories. I would edit .git/config and changed\nthe url entries with the new value.\n\nHTH,\nSanti\n"},{"id":"125188","messageId":"8440EA2C12E50645A68C4AA988716651244654@SERVER.webdezign.local","threadId":"21262","inReplyTo":"vpqk4yv2ws6.fsf@bauges.imag.fr","subject":"RE: Moving git","fromName":"Richard","fromEmail":"richard@webdezign.co.uk","sentAt":"2009-10-16T15:45:24Z","receivedAt":"2009-10-16T15:45:24Z","isPatch":false,"sender":{"key":"richard@webdezign.co.uk","avatar":"https://gravatar.com/avatar/36c0bc285b2d30baa54ed2e1488161fd27a4a4a8128836a673b66204ab08c9b7?d=mp&s=160"},"body":"Hi Matthieu,\n\n\nThanks for replying.\n\nBasically, I used git-svn to import from git. I'm trying to get rid of\nthe origin branch. (I probably should have used the no-metdata switch).\n\nThe command I used was\n\ngit branch prune origin\n\nI tried \"git remote rm origin\" which worked on my local win32 machine,\nbut the linux server I was working on did not recognise \"git remote rm\".\n\nI'm pretty sure git stores the current git directory as I've seen the\n--git-dir and --work-tree environment variables. Plus I also noticed on\nmsysgit gives \" Local uncommitted changes, not checked in to index\"\nsometimes, when I move the directory.\n\n\nRegards,\n\nRichard\n\n-----Original Message-----\nFrom: Matthieu Moy [mailto:Matthieu.Moy@grenoble-inp.fr] \nSent: 16 October 2009 16:17\nTo: Richard\nCc: git@vger.kernel.org\nSubject: Re: Moving git\n\nRichard Lee <richard@webdezign.co.uk> writes:\n\n> Hi Git forum,\n>\n> I've just started using git yesterday, so I'm very new. So please\nexcuse if\n> I've done something the wrong way.\n>\n> I cloned a git directory/repository? and then moved it. I'm trying to\nprune\n> branches and it gives\n\nWhich command did you type?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"125189","messageId":"vpqbpk71fox.fsf@bauges.imag.fr","threadId":"21262","inReplyTo":"8440EA2C12E50645A68C4AA988716651244654@SERVER.webdezign.local","subject":"Re: Moving git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-10-16T16:11:58Z","receivedAt":"2009-10-16T16:11:58Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"\"Richard\" <richard@webdezign.co.uk> writes:\n\n> Hi Matthieu,\n>\n>\n> Thanks for replying.\n>\n> Basically, I used git-svn to import from git. I'm trying to get rid of\n> the origin branch. (I probably should have used the no-metdata switch).\n>\n> The command I used was\n>\n> git branch prune origin\n>\n> I tried \"git remote rm origin\" which worked on my local win32 machine,\n> but the linux server I was working on did not recognise \"git remote rm\".\n>\n> I'm pretty sure git stores the current git directory as I've seen the\n> --git-dir and --work-tree environment variables.\n\nGit doesn't store them by default for the current repository. \"git\nrev-parse --git-dir\" guesses where your .git/ directory is (looking\nfor ./.git/, ../.git, and so on). OTOH, Git stores URLs for remote\nrepositories (see .git/config).\n\n> Plus I also noticed on msysgit gives \" Local uncommitted changes,\n> not checked in to index\" sometimes, when I move the directory.\n\nI don't know msysgit, but I guess you'll have problems if your\nrepository is on a FAT filesystem. Is it the case?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"125190","messageId":"25928820.post@talk.nabble.com","threadId":"21262","inReplyTo":"25926819.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Richard Lee","fromEmail":"richard@webdezign.co.uk","sentAt":"2009-10-16T17:04:27Z","receivedAt":"2009-10-16T17:04:27Z","isPatch":false,"sender":{"key":"richard@webdezign.co.uk","avatar":"https://gravatar.com/avatar/36c0bc285b2d30baa54ed2e1488161fd27a4a4a8128836a673b66204ab08c9b7?d=mp&s=160"},"body":"\nHi all,\n\nThank you to Matthieu Moy and Santi Béjar who both told me to check\n.git/config.\n\nThe reason why I had problems was because I was using git config --get-all\n(with no regex). I then used git config -l and saw the remote local path to\nthe repository that I used to clone.\n\nThe reason I had problem with git remote rm was because I was using version\n1.5.2 as I installed it from yum. (This is what I hate about CentOS, all the\nrepositories are old as dirt.) I compiled version 1.6.5 and the command was\nthere. I think the ability probably was there in 1.5.2, but you probably had\nto do some extra magic stuff to completely remove the repository. And by\ntrying to git remote prune didn't help either as I had deleted the local\nrepository.\n\nI now could \"git remote rm origin\" with no problems after moving the whole\ngit directory.\n\nRichard\n-- \nView this message in context: http://www.nabble.com/Moving-git-tp25926819p25928820.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"125192","messageId":"vpq8wfbz2lc.fsf@bauges.imag.fr","threadId":"21262","inReplyTo":"25928820.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-10-16T17:10:55Z","receivedAt":"2009-10-16T17:10:55Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Richard Lee <richard@webdezign.co.uk> writes:\n\n> The reason I had problem with git remote rm was because I was using version\n> 1.5.2 as I installed it from yum. (This is what I hate about CentOS, all the\n> repositories are old as dirt.) I compiled version 1.6.5 and the command was\n> there.\n\nIt's a good idea to have a recent version of Git. The\nuser-friendlyness of Git is progressing quickly, and each new version\nbrings a myriad of little details that will make your life easier\nwhile learning Git ;-).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"125201","messageId":"20091016184251.GG19511@inocybe.localdomain","threadId":"21262","inReplyTo":"25928820.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2009-10-16T18:42:51Z","receivedAt":"2009-10-16T18:42:51Z","isPatch":false,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Richard Lee wrote:\n> The reason I had problem with git remote rm was because I was using\n> version 1.5.2 as I installed it from yum. (This is what I hate about\n> CentOS, all the repositories are old as dirt.)\n\nNot that it's much newer, but if you use the EPEL repository, 1.5.5.6\nis available.\n\n> I compiled version 1.6.5 and the command was there.\n\nAnd if it helps, the Fedora package is intended to be able to build\ncleanly on CentOS as well -- though it depends on some macro settings\navailable in the buildsys-macros package found at:\n\n    http://buildsys.fedoraproject.org/buildgroups/rhel5/\n\n...in the proper directory for your architecture.\n\n-- \nTodd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nEvery time I close the door on reality, it comes in through the\nwindows.\n\n"},{"id":"125365","messageId":"1255944627643-3848039.post@n2.nabble.com","threadId":"21262","inReplyTo":"20091016184251.GG19511@inocybe.localdomain","subject":"Re: Moving git","fromName":"rhlee","fromEmail":"richard@webdezign.co.uk","sentAt":"2009-10-19T09:30:27Z","receivedAt":"2009-10-19T09:30:27Z","isPatch":false,"sender":{"key":"richard@webdezign.co.uk","avatar":"https://gravatar.com/avatar/36c0bc285b2d30baa54ed2e1488161fd27a4a4a8128836a673b66204ab08c9b7?d=mp&s=160"},"body":"\nThanks, I've been looking for something like EPEL for a long time.\n-- \nView this message in context: http://n2.nabble.com/Moving-git-tp3836198p3848039.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"125489","messageId":"alpine.LNX.2.00.0910201222080.14365@iabervon.org","threadId":"21262","inReplyTo":"25926819.post@talk.nabble.com","subject":"Re: Moving git","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2009-10-20T16:33:42Z","receivedAt":"2009-10-20T16:33:42Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 20 Oct 2009, Richard Lee wrote:\n\n> \n> Hi Git forum,\n> \n> I've just started using git yesterday, so I'm very new. So please excuse if\n> I've done something the wrong way.\n> \n> I cloned a git directory/repository? and then moved it. I'm trying to prune\n> branches and it gives\n> \n> ]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or not a\n> git archive\n> fatal: The remote end hung up unexpectedly\n> ls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command returned\n> error: 1\n> \n> b2.git was the cloned bare thing I create following the instruction here:\n> \n> http://book.git-scm.com/4_setting_up_a_private_repository.html\n> \n> Is there someway I can get git to update the git base directory?\n\nThe exact problem, I think, is that your clone has saved the original \nlocation of the bare repository as the default upstream repository \nlocation, and now it's not there. (It's a little hard to tell without the \ncommand that you were running when you got the error.)\n\nIf you edit the clone's .git/config, you should see the old location in a \n'[remote \"origin\"]' section. If you change this to the new location, \neverything should work. You can also do it with \"git remote\" somehow, but \nI personally just edit the config file, so I don't know the details.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"125491","messageId":"8440EA2C12E50645A68C4AA9887166512446DD@SERVER.webdezign.local","threadId":"21262","inReplyTo":"alpine.LNX.2.00.0910201222080.14365@iabervon.org","subject":"RE: Moving git","fromName":"Richard","fromEmail":"richard@webdezign.co.uk","sentAt":"2009-10-20T16:37:12Z","receivedAt":"2009-10-20T16:37:12Z","isPatch":false,"sender":{"key":"richard@webdezign.co.uk","avatar":"https://gravatar.com/avatar/36c0bc285b2d30baa54ed2e1488161fd27a4a4a8128836a673b66204ab08c9b7?d=mp&s=160"},"body":"Thanks to anyone for the reply, but this issue has been resolved. I\nmight have submitted this several times, but Nabble keeps on nagging me\nabout multiple posts. So I'm just going to delete it.\n\n-----Original Message-----\nFrom: Daniel Barkalow [mailto:barkalow@iabervon.org] \nSent: 20 October 2009 17:34\nTo: Richard\nCc: git@vger.kernel.org\nSubject: Re: Moving git\n\nOn Tue, 20 Oct 2009, Richard Lee wrote:\n\n> \n> Hi Git forum,\n> \n> I've just started using git yesterday, so I'm very new. So please\nexcuse if\n> I've done something the wrong way.\n> \n> I cloned a git directory/repository? and then moved it. I'm trying to\nprune\n> branches and it gives\n> \n> ]fatal: '/var/www/vhosts/mydomain.co.uk/b2.git': unable to chdir or\nnot a\n> git archive\n> fatal: The remote end hung up unexpectedly\n> ls-remote --heads /var/www/vhosts/mydomain.co.uk/b2.git: command\nreturned\n> error: 1\n> \n> b2.git was the cloned bare thing I create following the instruction\nhere:\n> \n> http://book.git-scm.com/4_setting_up_a_private_repository.html\n> \n> Is there someway I can get git to update the git base directory?\n\nThe exact problem, I think, is that your clone has saved the original \nlocation of the bare repository as the default upstream repository \nlocation, and now it's not there. (It's a little hard to tell without\nthe \ncommand that you were running when you got the error.)\n\nIf you edit the clone's .git/config, you should see the old location in\na \n'[remote \"origin\"]' section. If you change this to the new location, \neverything should work. You can also do it with \"git remote\" somehow,\nbut \nI personally just edit the config file, so I don't know the details.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}