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

Re: Git - Pushing to a production website

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Jan 10, 2009, 05:54 UTC
Message-ID
<200901092354.16973.bss@iguanasuicide.net>
In-Reply-To
<20090109233037.31198694@family.dyweni.com>

On Friday 09 January 2009, 4jxDQ6FQee2H@dyweni.com wrote about 'Re: Git - Pushing to a production website':

Show 11 quoted lines
>> > - Do a git pull
>>
>> I'm not enitirely sure you want post-update doing the pull.
>
>Let's say the website lives in /srv/www/htdocs
>Let's also say the git repository lives in /srv/www/git
>
>All developers pull/push from /srv/www/git  (git@server:/srv/www/git)
>
>The website is a clone of /srv/www/git and only tracks 'master'.
>Post-update (simplified) changes to /srv/www/htdocs and does 'git pull'.

Ah. I was assuming you were "git pull"ing in the repository that the hook was running from. In this case you are "git pull"ing in a different repository, which should be fine.

Show 9 quoted lines
>> >This leaves 'working' == 'master^'
>>
>> Actually, it leaves HEAD == working and master == working^.
>
>I'm sorry - I mixed up my terminology.
>
>I am referring to the branch's log.
>
>'working' has 1 more log entry than 'master'.
Yes, which means working^ == master.

commit-ish^ means the first parent of commit-ish commit-ish^2 means the second parent of commit-ish commit-ish~2 means the "first grandparent" of commit-ish

Show 5 quoted lines
>Example:
> - git log master | grep ^commit | tail -n 2 | head -n 1
> - git log working | grep ^commit | tail -n 1 | head -n 1
>
>Both of these commands should return the same commit hash.
As would:
- git rev-parse master
- git rev-parse working^
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     
Previous: 4jxdq6fqee2h@dyweni.comNext: david@lang.hm
Message 6 of 10 in “Git - Pushing to a production website”
  1. 4jxdq6fqee2h@dyweni.comJan 10, 2009
  2. Boyd Stephen Smith Jr.Jan 10, 2009
  3. 4jxdq6fqee2h@dyweni.comJan 10, 2009
  4. Boyd Stephen Smith Jr.Jan 10, 2009
  5. 4jxdq6fqee2h@dyweni.comJan 10, 2009
  6. Boyd Stephen Smith Jr.Jan 10, 2009
  7. david@lang.hmJan 10, 2009
  8. Jacob HelwigJan 10, 2009
  9. David AguilarJan 10, 2009
  10. Sitaram ChamartyJan 10, 2009

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.