如何判断git pull 成功
大家讲道理
大家讲道理 2017-05-02 09:20:09
0
2
833

我在弄自动化代码部署。现在有点不明白。当用脚本去git pull origin master 后,有可能失败,有可能成功。那么有没有办法知道成功和失败的状态。
谢谢!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
为情所困

It can usually be seen. If there is an error, it will usually be fatal, and you will be prompted as to why the error occurred: there may be a conflict, etc.

Ty80
if [ $? == 0 ];then
  echo "success"
else
    echo "fail"
fi

Try the above code

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!