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

Re: [RFC] Removing deleted files after checkout

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Aug 23, 2005, 22:12 UTC
Message-ID
<Pine.LNX.4.63.0508231753340.23242@iabervon.org>
In-Reply-To
<20050823214020.GA3763@hpsvcnb.fc.hp.com>
On Tue, 23 Aug 2005, Carl Baldwin wrote:
> The point is to push and use a post-update hook to do the checkout.  So,
> this won't be possible.

You could have the remote repository be something like "~/git/website.git", and have a hook which does: "cd ~/www; git pull ~/git/website.git/". That is, have three things: the directory where you work on stuff, the central storage location, and the area that the web server serves, and have the storage location automatically update the web server area. That's what I do with my website section that's still in CVS, and the general concept is good (and means that the "real" repository isn't somewhere the web server is poking around).

Show 10 quoted lines
> > which will correctly identify before and after, and remove any files that
> > were removed.
> >
> > Alternatively, you could do, at point 1:
> >
> > cp .git/refs/master .git/refs/deployed
> > git checkout deployed
>
> How to get a post-update hook to do this?  I suppose an update script
> could set this up for the post-update to later use.

If you have "deployed" checked out, and you push to "master" in the same repository, having the hook do "git resolve deployed master auto-update" should work.

	-Daniel
*This .sig left intentionally blank*
Previous: Carl BaldwinNext: Junio C Hamano
Message 6 of 10 in “[RFC] Removing deleted files after checkout”
  1. Carl BaldwinAug 23, 2005
  2. Daniel BarkalowAug 23, 2005
  3. Carl BaldwinAug 23, 2005
  4. Daniel BarkalowAug 23, 2005
  5. Carl BaldwinAug 23, 2005
  6. Daniel BarkalowAug 23, 2005
  7. Junio C HamanoAug 23, 2005
  8. Carl BaldwinAug 23, 2005
  9. Daniel BarkalowAug 23, 2005
  10. Junio C HamanoAug 24, 2005

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.