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

Re: git push stages original version on server

From
Paolo Bonzini <bonzini@gnu.org>
Date
Sep 11, 2009, 11:09 UTC
Message-ID
<4AAA2FE7.5020802@gnu.org>
In-Reply-To
<D7E5118C-AE88-4C4B-8D8A-5AF16ECF731D@roalddevries.nl>
Pushing to a non-bare repository is discouraged.
> - How can I have git automatically checkout pushed changes on the server?

I think you could in principle add a hook that does the "git checkout" or "git reset --hard $(git symbolic-ref HEAD)", but I suggest pushing to a bare repository and have the hook trigger a "git pull" elsewhere.

Paolo
Previous: Roald de VriesNext: Mikael Magnusson
Message 2 of 3 in “git push stages original version on server”
  1. Roald de VriesSep 11, 2009
  2. Paolo BonziniSep 11, 2009
  3. Mikael MagnussonSep 11, 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.