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

post-update hook

From
JRJeremy Ramer <jdramer@gmail.com>
Date
Nov 13, 2008, 15:53 UTC
Message-ID
<b9fd99020811130753o13c5aa0cj79126a502d449cde@mail.gmail.com>

I have a set up where I have a local git repo (local1) that I make changes to and two public repos (remote1, remote2) that hold the current state of the repo for other applications to access. So my plan is to make the change is local1, then git commit git push remote1 master git push remote2 master

However, the remotes currently have master checked out so though the repo gets updated the working directory does not. I tried editting the post-update hook as follows

#!/bin/sh echo Update changes... git checkout master .

but it does not seem to make any difference. Am I missing something in the way post-update works? It would be really nice to get this working so I don't have to log into each remote and do a pull. local1 is running git version 1.6.0.2. remotes are running git version 1.5.6.

Thanks! Jeremy

Next: Junio C Hamano
Message 1 of 4 in “post-update hook”
  1. Jeremy RamerNov 13, 2008
  2. Junio C HamanoNov 13, 2008
  3. Jeremy RamerNov 13, 2008
  4. Junio C HamanoNov 13, 2008

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.