有没有办法做到这一点?如果repo只是在.git/config
之类的
....
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
support = support/
versiontag = v
答案 0 :(得分:4)
Answered here。基本上是:
答案 1 :(得分:0)
我要检查的是运行以下命令:
git flow config >/dev/null 2>&1
。如果已初始化,则以0
退出,否则以1
退出。
我通常这样做:
if $(git flow config >/dev/null 2>&1)
then
echo initialized
else
echo not initialized
git flow init -d
fi
我有些短了:
git flow config >/dev/null 2>&1 || git flow init -d