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

git push to a local directory with no .git in it

From
RCRichard Curnow <rc@rc0.org.uk>
Date
Sep 29, 2005, 23:25 UTC
Message-ID
<loom.20050930T011606-58@post.gmane.org>
Background: I have to use plain FTP to upload content to my web site.  I keep a
local mirror of the entire site, then use an automated upload mechanism to do
the FTP step.

To release a git repository onto my site, I want to 'git push' from my working area to the release area in the local mirror. So what ends up as

    http://www.rpcurnow.force9.co.uk/git/mairix.git

lives in ~/homepage/git/mairix.git locally. That directory contains HEAD, refs, objects, hooks; I don't have a .git subdirectory in the middle.

If I cd to ~/gitwork/mairix (which is a regular working area) and do
    git push ~/homepage/git/mairix.git master:master
I get
fatal: /home/richard/homepage/git/mairix.git doesn't appear to be a git directory
presumably because there is no .git in it.
I could cd to ~/homepage/git/mairix.git and do things like
    GIT_DIR=. gitk --all

but what's the equivalent of this GIT_DIR trick when it's the remote end of a 'git push' that has the problem?

Cheers Richard

Next: Junio C Hamano
Message 1 of 3 in “git push to a local directory with no .git in it”
  1. Richard CurnowSep 29, 2005
  2. Junio C HamanoSep 30, 2005
  3. Richard CurnowSep 30, 2005

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.