hpr2446 :: Git server and git hooks
Klaatu talks about running git on a server, and explains git hooks.
Hosted by Klaatu on Monday, 2017-12-18 is flagged as Clean and is released under a CC-BY-SA license.
git.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr2446
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:40:30
Version Control.
This is an open series in which Hacker Public Radio Listeners can share their knowledge and experience of version or revision control systems such as Bazaar, Mercurial, Subversion, CVS and Git.
A sample post-receive git hook:
#!/usr/bin/tcsh
foreach arg ( $< )
set argv = ( $arg )
set refname = $1
end
set branch = `git rev-parse --symbolic --abbrev-ref $refname`
echo $branch
if ( "$branch" == "master" ) then
echo "Branch detected: master"
echo "Do some stuff here."
else if ( "$branch" == "dev" ) then
echo "Branch detected: dev"
echo "Do something else here."
else
echo "Do something entirely different here."
endif