我遇到了一个问题,我就是想不通,连续几天研究并尝试了许多组合和方法,但似乎无法解决这个问题。
我使用 Atlassian Stash 作为自托管的 git 中央仓库。 https://www.atlassian.com/software/stash
我还使用 Dploy 通过 FTP 部署更改。 http://leanmeanfightingmachine.github.io/dploy/
Dploy 在 .git/hooks/ 文件夹中创建自己的提交后挂钩,如下所示:
#!/bin/bash
# DPLOY
message=$(git log -1 --all --pretty=%B)
tag="#dploy"
if [[ "$message" = *"$tag"* ]]; then
servers=${tag}${message#*${tag}}
noTag=${servers//#/""}
eval $noTag
fi
当我从 cli 显式执行 dploy 时,它会成功运行并完成。一切正常。下面的命令:
dploy dev
但是,当我这样提交时:
commit -m "#dploy dev - Initial commit"
它卡住了(不接受任何键盘输入),我必须 Ctrl+C 才能摆脱它。
[ Wed Jun 11 2014 11:58:29 macbook as chris @ ami] git commit -m "#dploy dev"
Connecting to dev...
Checking revisions...
Checking diffs between [4361308e87183d8dfaf556da3182dd1095f58486] > [dd70f1cf70957e9e672cd371499fb4183a9d8b3b]
Files that will be uploaded:
[ ? ] .rev > public_html/ami/.rev
[ ? ] test.txt > public_html/ami/test.txt
[ ? ] .rev > public_html/ami/.rev
– Are you sure you want to upload those files? (Y/n)
它可能是一个非常具体的问题 - 有没有人经历过这个或想出一个解决方案?
谢谢,克里斯