Skip to content

Latest commit

 

History

History
90 lines (51 loc) · 1.67 KB

File metadata and controls

90 lines (51 loc) · 1.67 KB

Git flow

Follow Git branching model

  • master is for production

  • develop for test (next release)

  • feature created from develop for merging to develop

  • release created from develop for merging to master

  • hotfix created from master for merging to master

Install Git-flow

Init Git flow

git flow init or git flow init -f to force the initialization.

You can also use the default git config with git config --local include.path ../.gitconfig

If you receive some error about a branch that doesn't exist, checkout or create it.


Feature

Start new feature

git flow feature start feature-name

Finish feature development

git flow feature finish feature-name

git push to update remote


Release

Start new release from develop for merge changes to master

git flow release start 1.0.0

Finish release

git flow release finish 1.0.0

git push to update remote


Hotfixes

Start new hotfix from master

git flow hotfix start 1.0.1

Finish hotfix and merged to master

git flow hotfix finish 1.0.1

git push to update remote


Versioning

User semver for versioning your app


Errors

If you get this error: Fatal: Not a gitflow-enabled repo yet. Please run 'git flow init' first

Solve by doing this:

  • git add .
  • git commit -m "Saving edits"
  • git push
  • git checkout develop
  • git checkout master
  • git flow init -d -f

or you can

  • Open the .git\config
  • Remove from [gitflow "xxx"] till the other brackets.
  • Rerun git flow init