私のold questionを数回編集したら、今度は新しい質問ですので、新しいものを作ります。 .git/hooks/post-update
でgit post-updateスクリプトがうまくいきません
私が持っている:
echo "a" >> /home/pi/log
git update-server-info
git stash
git merge testing >> /home/pi/log
自動化されたチェックアウトを作るために。だから私は、クライアント上で実行します。
git push testing HEAD:testing
今私の/home/pi/log
は含まれています
a
Updating ae2f44b..04753a9
Fast-forward
application/views/main/index.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
しかし、ファイルが変更されませんでしたの!私は、スクリプトを削除した場合
$ git merge testing
Already up-to-date.
は、プッシュをすると、git stash
それが動作git merge testing
を実行します。
更新
テストのために私は
git show application/views/main/index.php
しかし
vim application/views/main/index.php
を実行する場合、私は右のファイルのバージョンを見ることができる17から20までのファイルに番号を変更まだ古い番号が含まれています。しかし、Gitは、ファイルが更新されると主張:
$ git merge testing
Already up-to-date.
スクリプトの実行コンテキストで環境変数GIT_DIR、GIT_WORK_TREE、およびGIT_INDEXを確認できますか? – sehe