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

git push stages original version on server

From
RVRoald de Vries <rdv@roalddevries.nl>
Date
Sep 11, 2009, 10:40 UTC
Message-ID
<D7E5118C-AE88-4C4B-8D8A-5AF16ECF731D@roalddevries.nl>
Hi all,

There's a thing I don't understand: I have a repository on a server from/to which I pull/push. But when I push to it, and do a checkout on the server, the pushed changes are not visible. It appears that the changed file is added to the index on the server automatically. Why is this? It seems dangerous. If I do a commit on the server, the changes from the client will be lost.

There's also a thing I'm not sure exists: I use a git server/client setup for developing a website. I would like git-pushes to appear immediately online (without having to ssh to the server and checking out manually). Is this possible?

My questions are:
- Why does git work like this?
- Can I change its behaviour (if I still want that after the answer to  
the previous question)?
- How can I have git automatically checkout pushed changes on the  
server?
Thanks in advance.
Kind regards,
Roald
Next: Paolo Bonzini
Message 1 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.