execute git commands on git push -
is there way execute couple of git commands when git push
master? i'm having in mind is, once did git push
grunt execute:
git checkout gh-pages git merge master git checkout master
why want use grunt execute these commands? think normal shell script suffice. assuming on linux, create executable file called post-receive
in .git/hooks
subdirectory, following contents:
#!/bin/sh export git_work_tree=$git_dir/.. git checkout gh-pages git merge master git checkout master
for more information search this page "post-receive hook".
Comments
Post a Comment