I've initiated a new git repository using git flow
, done a commit or two and pushed.
When I clone the repository in a new directory and run a git flow
command I get the error:
Fatal: Not a gitflow-enabled repo yet. Please run 'git flow init' first.
The reason for the error is that the .git/config
file in the newly cloned directory doesn't contain the git flow configuration.
How can I push/share the configuration so any clone of the repository will have the correct configuration?
The contents of the .git
folder are (intended to be) specific to an individual install.
Instead of trying to directly share your config, consider adding a script to the repository to setup whatever config you want to share. e.g. add a file named bin/setup
to the repository with these contents:
#!/usr/bin/env bash
# simple
git flow init -d
# override stuff or whatever
git config gitflow.prefix.versiontag ""
git config gitflow.prefix.feature ""
Commit it:
-> chmod +x bin/setup
-> git add bin/setup
-> git commit -m "adding a setup script to ensure consistent config"
And run it on new clones:
-> git clone ....
-> cd project
-> bin/setup
-> git config -l --local
...
gitflow.branch.master=master
gitflow.branch.develop=development
gitflow.prefix.versiontag=
gitflow.prefix.feature=
gitflow.prefix.release=release/
gitflow.prefix.hotfix=hotfix/
gitflow.prefix.support=support/
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