正在创建中央存储库的gitosis post-push hook
更新将从中央存储库提取到测试环境中
nano/var/git/repositories/holding.git/hooks/post-update
#! /粗鲁的大衣/bash
cd /var/vh/holding;
git reset --hard;
git checkout testing;
git pull;
这是我在推送客户端后获得的(虚拟机开发) )。
# blah .
Counting objects: 57,done。
compressing objects :100 % (24/24 ),done
writingobjects:100%(30/30 )、3.42 KiB和done。
total30(Delta18 ),reused0(delta0)。
fatal : notagitrepository : '.'
fatal : notagitrepository : '.'
fatal : notagitrepository : '.'
fatal : notagitrepository : '.'
To git@cheby.ru:holding.git
233 b5 a2 . 0f 46 CD8testing-testing
很明显,我试图告诉git应该在哪里拉,但是失败了。
对bash脚本中指定的工作副本执行git命令的正确方法是什么?