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

Re: post-receive for web deployment

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Dec 19, 2011, 06:55 UTC
Message-ID
<4EEEDFD8.1050604@viscovery.net>
In-Reply-To
<CALzTOm+sJHF_7WzjD7bCqAiAbQSV0A3hEX1KdWfFzV7-ePzX2w@mail.gmail.com>
Am 12/19/2011 3:42, schrieb Stephen Major:
> checking the remote server files 4 5 6 are still found in:
> /home/user/domains/domain.com/public_html/live
> 
> Why is this happening?

Before you check out the files, you must ensure that the index matches the content in the GIT_WORK_TREE that you populate by git checkout.

You first push a tree that removes 4 5 6 while the index you happen to have still has those files recorded, the files are removed. Your second push does not have these files anymore, but the index does not record the files anymore, either; therefore, git does not act on the files 4 5 6 that happen to live in the other worktree.

Perhaps you should maintain separate index files and set GIT_INDEX_FILE accordingly before git checkout.

-- Hannes
Previous: Stephen MajorNext: Sitaram Chamarty
Message 2 of 4 in “Re: post-receive for web deployment”
  1. Stephen MajorDec 19, 2011
  2. Johannes SixtDec 19, 2011
  3. Sitaram ChamartyDec 19, 2011
  4. Stephen MajorDec 19, 2011

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.