André
André

Reputation: 103

About GitFlow Development

I'm using the GitFlow template.

I have two branch: master and development. Last week I discovered a minor bug in the system and created a branch called a bugfix/bug-name.

The bug has already been resolved but I have not yet released the software.

Today I will include a new feature in the system. Which way is right?

  1. Start the new functionality from the bugfix;
  2. Start the new functionality from the development and then when you finish merge the two to the release/x.x.x.x branch?

Upvotes: 0

Views: 52

Answers (2)

das-g
das-g

Reputation: 9994

In the gitflow branching scheme, you don't usually merge non-integration branches with each other. Everything is eventually merged into integration branches development (for unreleased stuff) and/or master (for releasing).

If the bugfix branch was branched off of master, it is a "hotfix" branch and should be merged to master and development (and then deleted).

If the bugfix branch was branched off of development it should be merged back to development (and then deleted).

If you've already started working on the new feature on its own branch (which probably has branched off of development) and if you need the bugfix on the feature branch, then merge development into the feature branch after the bugfix has been merged into development. If you don't need the bugfix while developing the feature, just wait until the feature is ready and is being merged into development where the bugfix will already have been merged.

If you haven't started working on the feature, simply create the feature branch from development after the bugfix has been merged there.

Upvotes: 1

xsami
xsami

Reputation: 1330

Either option will work if you know how to merge, making a new branch from bugfix or development are good options, but I would recommend it to do it from bugfix so it will be easier to merge with development later.

Upvotes: 0

Related Questions