git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Moving git

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 20, 2009, 16:33 UTC
Message-ID
<alpine.LNX.2.00.0910201222080.14365@iabervon.org>
In-Reply-To
<25926819.post@talk.nabble.com>
On Tue, 20 Oct 2009, Richard Lee wrote:
Show 20 quoted lines
> 
> 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*
Previous: rhleeNext: Richard
Message 10 of 11 in “Moving git”
  1. Richard LeeOct 16, 2009
  2. Matthieu MoyOct 16, 2009
  3. RichardOct 16, 2009
  4. Matthieu MoyOct 16, 2009
  5. Santi BéjarOct 16, 2009
  6. Richard LeeOct 16, 2009
  7. Matthieu MoyOct 16, 2009
  8. Todd ZullingerOct 16, 2009
  9. rhleeOct 19, 2009
  10. Daniel BarkalowOct 20, 2009
  11. RichardOct 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.