internetguru/flow

Add configuration support through git-config

petrzpav opened this issue · 5 comments

The following features can be configurable:

  • branches naming (e.g. use master or develop instead of dev; stable instead of master)
  • custom pull request URLs support, including GitLab #40
  • custom prefixes for feature and hotfix branches, e.g. feature/ instead of feature-
  • 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

Do the existing git-flow tools have some configuration?

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?

It is good idea. So we will primarily support omgf prefix and secondarily gitflow prefix (only rules that make sense).

Hooks will follow git standard and will not be placed in configuration file #52