Add configuration support through git-config
petrzpav opened this issue · 5 comments
petrzpav commented
The following features can be configurable:
- branches naming (e.g. use
master
ordevelop
instead ofdev
;stable
instead ofmaster
) - custom pull request URLs support, including GitLab #40
- custom prefixes for feature and hotfix branches, e.g.
feature/
instead offeature-
- set default behaviour for parameters, e.g.
--request
- set default environment variables
- set task to be run on particular events #52
This allows a common shared configuration to be commited into .gitconfig in the project and also set user's default preferences in ~/.gitconfig
petrzpav commented
Do the existing git-flow tools have some configuration?
petrzpav commented
Configuration proposal (file .gitconfig
):
# Enable this configuration:
# git config --local include.path ../.gitconfig
[flow]
defaultparams="--verbose"
changelogheader=""
prurl="??"
[flow "files"]
changelog="CHANGELOG.md"
version="VERSION"
[flow "branches"]
develop="dev"
stable="master"
origin="origin"
upstream="origin"
[flow "prefixes"]
feature="feature-"
hotfix="hotfix-"
version="v"
[flow "hooks"]
hook1="myfunction"
jnv commented
Actually, gitflow has a configuration system and they use git-config: https://github.com/petervanderdoes/gitflow-avh/wiki/Reference:-Configuration
Is it of any use to us?
jnv commented
Okay, so the gitflow has this:
git config gitflow.branch.develop my-dev-branch-name
Which is quite similar to the flow.branches
you propose. Perhaps we could support these as fallback and otherwise use omgf
namespace?