Is there any way to do this? Is the repo considered initialized if it simply has the git-flow directives in .git/config
like
....
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
support = support/
versiontag = v
?
Answered here. Basically:
What I do to check is I run following command:
git flow config >/dev/null 2>&1
. If it is initialized, then it exits with 0
otherwise with 1
.
I usually do something like this:
if $(git flow config >/dev/null 2>&1)
then
echo initialized
else
echo not initialized
git flow init -d
fi
I some time short it like:
git flow config >/dev/null 2>&1 || git flow init -d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With