
GitFlow is a collection of Git commands to provide many repository operations with just single command. It helps to keep track of features, hotfixes and releases in projects. It is used for projects where you might have multiple streams of work running concurrently.
+ OSX
+ Linux
$ apt-get install git-flow
+ Windows (Cygwin)
$ wget -q -O - --no-check-certificate
install stable | bash
See the Wiki for detailed Installation Instructions.
You need to initialize a new repo inside an existing git repository. Run following command:
git flow init [-d]
<p><strong>-d</strong> flag will accept all defaults.</p>
<p>This will ask questions like which branches you would like to use as development and production branches, and how would your prefixes be named. Press Enter to accept default suggestions.<br />
</p>
<h4><strong>FEATURE BRANCHES</strong></h4>
<p>Using git-flow feature branches you can easily work on multiple features of project at the same time.</p>
<p><strong>+ Create a feature branch</strong></p>
<p>New feature branch is created from the 'develop' branch and switches to it.</p>
git flow feature start MYFEATURE
- git flow feature
+ Publish a feature branch
Push a feature branch to the remote repository.
- git flow feature publish MYFEATURE
Note: This can be used only once in a branch, next time you want to push any code in same feature branch you need to use:
- git push origin feature/MYFEATURE
+ Track a feature branch
Get a feature published by another user (Pull a feature branch). git flow feature track MYFEATURE
This is similar to:
+ Finish a feature branch
Finish the development of a feature. This action performs the following:
Using git-flow release branches you can create tagged and versioned releases. Create a new release branch when you have completed current version and it’s ready to deploy to production.
+ Create a release branch
New release branch is created from the 'develop' branch and switches to it. git flow release start MYRELEASE
+ List all release branches
- git flow release
<p><strong>+ Publish a release branch</strong></p>
<p>Push a release branch to the remote repository.</p>
- git flow release publish MYRELEASE
<p><strong>+ Track a release branch</strong></p>
<p>Get a release published by another user (Pull a release branch).</p>
- git flow release track MYRELEASE
+ Track a release branch
Get a release published by another user (Pull a release branch).
- git flow release track MYRELEASE
+ Finish a release branch
Finish the development of a release. This action performs the following:
git flow release finish MYRELEASE
Note: Don't forget to push your tags
git push --tags
Using hotfix branches you can act immediately upon an undesired bugs on production version.
+ Create a hotfix branch
New release branch is created from the 'develop' branch and switches to it.
git flow hotfix start MYHOTFIX
myhotfix argument marks the new hotfix release name.
+ List all hotfix branches
- git flow hotfix
+ Finish a hotfix branch
Finish the development of a release. This action performs the following:
- git flow hotfix finish MYHOTFIX
Feel free to share your views regarding Git Flow we follow strictly for every project to ensure best results and need any assistance for Web Development Service Contact us now!!