$ git clone https://github.com/hzmajia/gitflow-example.git Cloning into 'gitflow-example'... warning: You appear to have cloned an empty repository. Checking connectivity... done.
$ cd gitflow-example && git flow init No branches exist yet. Base branches must be created now. Branch name for production releases: [master] Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Bugfix branches? [bugfix/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? [] Hooks and filters directory? [/home/zhongmingmao/gitflow-example/.git/hooks]
$ git checkout master Switched to branch 'master' Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup)
$ git push -u origin master Total 0 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git * [new branch] master -> master Branch master set up to track remote branch master from origin.
$ git flow feature start featureA Switched to a new branch 'feature/featureA' Summary of actions: - A new branch 'feature/featureA' was created, based on 'develop' - You are now on branch 'feature/featureA' Now, start committing on your feature. When done, use: git flow feature finish featureA
$ git flow publish featureA Total 0 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git * [new branch] feature/featureA -> feature/featureA Branch feature/featureA set up to track remote branch feature/featureA from origin. Already on 'feature/featureA' Your branch is up-to-date with 'origin/feature/featureA'. Summary of actions: - The remote branch 'feature/featureA' was created or updated - The local branch 'feature/featureA' was configured to track the remote branch - You are now on branch 'feature/featureA'
$ git flow feature finish featureA Switched to branch 'develop' Updating 378941f..6e6605d Fast-forward featureA | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 featureA To https://github.com/hzmajia/gitflow-example.git - [deleted] feature/featureA Deleted branch feature/featureA (was 6e6605d). Summary of actions: - The feature branch 'feature/featureA' was merged into 'develop' - Feature branch 'feature/featureA' has been locally deleted; it has been remotely deleted from 'origin' - You are now on branch 'develop'
$ git flow release start releaseA Branches 'develop' and 'origin/develop' have diverged. And local branch 'develop' is ahead of 'origin/develop'. Switched to a new branch 'release/releaseA' Summary of actions: - A new branch 'release/releaseA' was created, based on 'develop' - You are now on branch 'release/releaseA' Follow-up actions: - Bump the version number now! - Start committing last-minute fixes in preparing your release - When done, run: git flow release finish 'releaseA'
$ git push -u origin develop Counting objects: 3, done. Writing objects: 100% (3/3), 235 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git 378941f..6e6605d develop -> develop Branch develop set up to track remote branch develop from origin.
$ git flow publish releaseA Total 0 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git * [new branch] release/releaseA -> release/releaseA Branch release/releaseA set up to track remote branch release/releaseA from origin. Already on 'release/releaseA' Your branch is up-to-date with 'origin/release/releaseA'. Summary of actions: - The remote branch 'release/releaseA' was created or updated - The local branch 'release/releaseA' was configured to track the remote branch - You are now on branch 'release/releaseA'
$ git flow publish releaseA # git push origin release/releaseA Counting objects: 2, done. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 237 bytes | 0 bytes/s, done. Total 2 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git 6e6605d..f993ec4 release/releaseA -> release/releaseA Branch release/releaseA set up to track remote branch release/releaseA from origin. Already on 'release/releaseA' Your branch is up-to-date with 'origin/release/releaseA'. Summary of actions: - The remote branch 'release/releaseA' was created or updated - The local branch 'release/releaseA' was configured to track the remote branch - You are now on branch 'release/releaseA'
$ git flow release finish releaseA Switched to branch 'master' Your branch is up-to-date with 'origin/master'. Merge made by the 'recursive' strategy. featureA | 0 releaseA | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 featureA create mode 100644 releaseA Switched to branch 'develop' Your branch is up-to-date with 'origin/develop'. Merge made by the 'recursive' strategy. releaseA | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 releaseA To https://github.com/hzmajia/gitflow-example.git - [deleted] release/releaseA Deleted branch release/releaseA (was f993ec4). Summary of actions: - Release branch 'release/releaseA' has been merged into 'master' - The release was tagged 'releaseA' - Release tag 'releaseA' has been back-merged into 'develop' - Release branch 'release/releaseA' has been locally deleted; it has been remotely deleted from 'origin' - You are now on branch 'develop'
$ git flow hotfix start hotfixA Switched to a new branch 'hotfix/hotfixA' Summary of actions: - A new branch 'hotfix/hotfixA' was created, based on 'master' - You are now on branch 'hotfix/hotfixA' Follow-up actions: - Start committing your hot fixes - Bump the version number now! - When done, run: git flow hotfix finish 'hotfixA'
$ git flow publish hotfixA Total 0 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git * [new branch] hotfix/hotfixA -> hotfix/hotfixA Branch hotfix/hotfixA set up to track remote branch hotfix/hotfixA from origin. Already on 'hotfix/hotfixA' Your branch is up-to-date with 'origin/hotfix/hotfixA'. Summary of actions: - The remote branch 'hotfix/hotfixA' was created or updated - The local branch 'hotfix/hotfixA' was configured to track the remote branch - You are now on branch 'hotfix/hotfixA'
$ git flow publish hotfixA Counting objects: 2, done. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 249 bytes | 0 bytes/s, done. Total 2 (delta 0), reused 0 (delta 0) To https://github.com/hzmajia/gitflow-example.git 4944ec5..e17d475 hotfix/hotfixA -> hotfix/hotfixA Branch hotfix/hotfixA set up to track remote branch hotfix/hotfixA from origin. Already on 'hotfix/hotfixA' Your branch is up-to-date with 'origin/hotfix/hotfixA'. Summary of actions: - The remote branch 'hotfix/hotfixA' was created or updated - The local branch 'hotfix/hotfixA' was configured to track the remote branch - You are now on branch 'hotfix/hotfixA'
$ git flow hotfix finish hotfixA Switched to branch 'master' Your branch is up-to-date with 'origin/master'. Merge made by the 'recursive' strategy. hotfixA | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hotfixA Switched to branch 'develop' Your branch is up-to-date with 'origin/develop'. Merge made by the 'recursive' strategy. hotfixA | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hotfixA To https://github.com/hzmajia/gitflow-example.git - [deleted] hotfix/hotfixA Deleted branch hotfix/hotfixA (was e17d475). Summary of actions: - Hotfix branch 'hotfix/hotfixA' has been merged into 'master' - The hotfix was tagged 'hotfixA' - Hotfix tag 'hotfixA' has been back-merged into 'develop' - Hotfix branch 'hotfix/hotfixA' has been locally deleted; it has been remotely deleted from 'origin' - You are now on branch 'develop'