【发布时间】:2011-07-16 16:15:29
【问题描述】:
我有一个脚本,我需要根据是否有任何提交,即一个或多个提交来采取不同的行动。最好的方法是什么?
在伪代码中它看起来像这样..
#!/bin/bash
if [[ `git log_count` == "0" ]]; then
echo "No commits exist for this repo."
# Do stuff..
else
echo "One or more commits do exist!"
# Do other stuff
fi
有什么想法吗?
【问题讨论】: