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

Re: Using git for code deployment on webservers?

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 17, 2009, 20:33 UTC
Message-ID
<81b0412b0906171333l38b1c2e0y2e166bc0ae7a461d@mail.gmail.com>
In-Reply-To
<81b0412b0906171326y6821d511u5b93cda4a5c14458@mail.gmail.com>
2009/6/17 Alex Riesen <raa.lkml@gmail.com>:
> Or, you can just keep a namespace for each server in the intermediate
I mean namespace of branches:
  refs/heads/webserver_1/master (current)
  refs/heads/webserver_1/next (to be updated to)
> repositories, which records the version the server has and the version
> it should have. Then you can use git diff-tree to find you which files
> have to be transferred. You wont be able to record changes on the servers,
> though.
Something like that:

git diff-tree --diff-filter=AM webserver1_/master..webserver_1/next | while read f; do scp "$f" webserver_1:"$f" || break; done git diff-tree --diff-filter=D webserver1_/master..webserver_1/next | while read f; do ssh webserver_1 rm -f "$f" || break; done

Previous: Alex Riesen
Message 10 of 10 in “Using git for code deployment on webservers?”
  1. Ingo OeserJun 15, 2009
  2. Allan WindJun 16, 2009
  3. Ingo OeserJun 17, 2009
  4. Thomas KochJun 16, 2009
  5. Ingo OeserJun 17, 2009
  6. Daniel BarkalowJun 16, 2009
  7. Ingo OeserJun 17, 2009
  8. Daniel BarkalowJun 17, 2009
  9. Alex RiesenJun 17, 2009
  10. Alex RiesenJun 17, 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.