Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/branch prefixes as subcommands #6463

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

70853n
Copy link

@70853n 70853n commented Jul 25, 2021

How to test

  • run git flow init
  • when asked for delimiter enter custom delimiter (only valid characters for git branch names)
  • when asked for branch prefixes, enter custom prefix (without delimiter)
  • run git flow help
  • run git flow <prefix> help
  • run git flow <prefix> <subaction>

Example

$ git flow init
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master] release
Branch name for "next release" development: [develop] integration

How to name your supporting branch prefixes?
Delimiter between prefix and name? [/] 
Feature branches? [feature] change
Release branches? [release] candidate
Hotfix branches? [hotfix] 
Support branches? [support] 
Version tag prefix? [] 
$ git flow help
usage: git flow <subcommand>

Available subcommands are:
    init	Initialize a new git repo with support for the branching model.
    change	Manage your change branches.
    candidate	Manage your candidate branches.
    hotfix	Manage your hotfix branches.
    support	Manage your support branches.
    version	Shows version information.

Try 'git flow <subcommand> help' for details.

Benefits consistent branch naming
If non-default branch prefixes are chosen, it is now possible to use these prefixes as subcommands.
Example of invoking git flow help while custom prefixes are configured:

Available subcommands are:
    init        Initialize a new git repo [...]
    change      Manage your change branches.
    candidate   Manage your candidate branches.
    bugfix      Manage your bugfix branches.
    incident    Manage your incident branches.
    version     Shows version information.
@70853n
Copy link
Author

70853n commented Aug 22, 2021

I'm not sure whether I've overlooked some instances where the default subcommand name is not replaced, or I wasn't able to change that. Gotta look into it, some time, if anyone still cares about this project.

Example

$ git flow change start the-first-part-of-a-bigger-feature
Switched to a new branch 'change/the-first-part-of-a-bigger-feature'

Summary of actions:
- A new branch 'change/the-first-part-of-a-bigger-feature' was created, based on 'integration'
- You are now on branch 'change/the-first-part-of-a-bigger-feature'

Now, start committing on your feature. When done, use:

     git flow feature finish the-first-part-of-a-bigger-feature

Can someone think of an easy fix for that?

@ChrisJStone
Copy link

I working on updating a fork here feel free to submit an issue or pull request to see if we can get this implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants