是否有任何方式,以使在GIT中钩回波GIT中钩:使能回声命令
/var/git/repositories/project.git/hooks/post-update
#!/bin/bash
unset GIT_DIR;
echo '========post-update hook========='
cd /var/project;
git reset --hard;
git checkout testing;
git pull;
chmod -R 774 ./lib
update-apps
上的另一mashine
期望的git推输出:
#git push
...
Writing objects: 100% (10/10), 5.98 KiB, done.
Total 10 (delta 3), reused 8 (delta 1)
========post-update hook=========
cd /var/project
git reset --hard
git checkout testing
git pull
chmod -R 774 ./lib
update-apps
这仅仅是一个例子,实际的命令链可能更复杂
和失败的地方
我应该将stdout莫名其妙地?
UPDATE
目前我有正常git push
输出,然后========post-update hook=========
......并没有什么
哦! git版本是1.5.6.5
但是当你尝试时,你的实际输出是什么? –
检查钩子是否可执行(chmod + x) – sehe