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

Re: recipe to use git for deployment

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2012, 04:31 UTC
Message-ID
<7v4nrv8czo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<jo283q$kna$1@dough.gmane.org>
Neal Kreitzinger <nkreitzinger@gmail.com> writes:
> I'm trying to cook up automated mass deployment using git as the main
> ingredient.
I think the standard answer to this is "don't do it".

You could of course add hooks to hack around it, but fundamentally Git was designed to track source files (so the only sane behaviour for "checking out" is to keep the timestamp of the working tree file to whatever the underlying OS gives it when "checkout" happens, for example), so anything that your "deployment strategy" wants conflicts with what the usual source coutrol operation should do, you need to tweak around what Git does (the same thing can be said for CVS or SVN, by the way).

Unless you do this with an understanding that you are merely using git "as a better rsync" and take responsiblity of everything else that git-the-scm does _not_ do for you, I suspect that you would be volunteering for a lot of pain.

Previous: Neal KreitzingerNext: Ævar Arnfjörð Bjarmason
Message 8 of 9 in “recipe to use git for deployment”
  1. Neal KreitzingerMay 5, 2012
  2. Marc WeberMay 5, 2012
  3. Neal KreitzingerMay 5, 2012
  4. Marc WeberMay 5, 2012
  5. Neal KreitzingerMay 5, 2012
  6. Sitaram ChamartyMay 5, 2012
  7. Neal KreitzingerMay 16, 2012
  8. Junio C HamanoMay 5, 2012
  9. Ævar Arnfjörð BjarmasonMay 5, 2012

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.