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

post-update to stash after push to non-bare current branch

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Jan 18, 2012, 17:53 UTC
Message-ID
<jf70vc$kol$1@dough.gmane.org>

We use the worktree of git-repos as the webroot for virtual hosts assigned to ports so we can directly test changes to dev and test git-repos. We have some developers who want to develop offline on laptops and push to these non-bare repos so they can test their changes. My plan is to set receive.denyCurrentBranch = warn, and then use the post-update hook on the remote non-bare to do a stash of the worktree and index. My assumption is that post-update hook only executes after a successful push. Correct? I only want to stash the non-bare remote work-tree and index after a successful push to it (effectively doing a git-reset --hard, but also keeping any changes to the worktree/index of the non-bare remote as a safety in case someone does directly make uncommitted changes on the non-bare remote.)

v/r, neal

Next: Neal Kreitzinger
Message 1 of 10 in “post-update to stash after push to non-bare current branch”
  1. Neal KreitzingerJan 18, 2012
  2. Neal KreitzingerJan 18, 2012
  3. Neal KreitzingerJan 18, 2012
  4. Junio C HamanoJan 18, 2012
  5. Neal KreitzingerJan 19, 2012
  6. Junio C HamanoJan 19, 2012
  7. Neal KreitzingerJan 19, 2012
  8. Neal KreitzingerJan 21, 2012
  9. Junio C HamanoJan 21, 2012
  10. Neal KreitzingerJan 21, 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.