Groovy Gitflow
GGitflow provides a Groovy implementation for Vincent Driessen's branching model http://nvie.com/posts/a-successful-git-branching-model/
Initialise repository for Gitflow
// Use default branch and prefix names for Gitflow
def repoDir = new File("/path/to/git/repo/base/directory")
def init = new GitflowInit(repoDir:repoDir)
init.cmdDefault()
// Use your own preferred branch and prefix names for Gitflow
def init = new GitflowInit(repoDir:repoDir,masterBrnName:'production',developBrnName:'integration',featureBrnPref:'feat/',releaseBrnPref:'rel/',hotfixBrnPref:'fix/',supportBrnPref:'maintenance/',versionTagPref:'version')
init.cmdDefault()
Start & Finish a Feature branch
def feature = new GitflowFeature(init:init)
feature.start("JIRA-123")
feature.finish("JIRA-123")
Start & Finish a Release branch
def release = new GitflowRelease(init:init)
release.start("1.0")
release.finish("1.0")
Start & Finish a Hotfix branch
def hotfix = new GitflowHotfix(init:init)
hotfix.start("1.0.1")
hotfix.finish("1.0.1")
Start a Support branch
def support = new GitflowSupport(init:init, startCommit:"1.0")
support.start("")
Authors and Contributors
Desmond (Dessie) Kirrane (@dkirrane)