-1

I have introduced GitFlow to my Team and right now we are working using the following branch structure, which blend perfectly well with our internal workflows:

enter image description here

Current Structure

We have master which makes a pull request from dev every end of Sprint using a TAG with the name of the Sprint.

We have dev which is the source of our code and then we have a branch for each plugin we are working on.

Workflow

If you are going to work on a new plugin/feature we are using this approach:

git checkout dev
git pull
git branch -b "your plugin"
...
git commit
git push origin "your plugin"
...
pull request from "your plugin" into dev

The questions that I have are the following:

  1. When dev need to issue a pull request from one of our plugin branches? Every time there is a push into "my plugin" branch?
  2. If a Developer is working on plugin02 and merge into dev, how can I get the changes also into plugin04 branch?
  3. Final, if someone works straight on master, like for an emergency bug, how can we re-sync all sub branches? Does this happen when we issue pull request?
Raffaeu
  • 6,694
  • 13
  • 68
  • 110
  • What is the reason of the downvote without even answering? – Raffaeu Dec 28 '17 at 13:21
  • Why would a downvote needs to be accompanid by an answer? One indicates that the question isn't up to par quality wise.... the other gives you an answer. These two actions aren't related in the slightest. – Patrice Dec 28 '17 at 14:15
  • @Patrice I just don't see the utility of such action. It does not add value to my problem. – Raffaeu Dec 28 '17 at 14:37
  • Downvoting is a quality control mechanism. It's not meant to help you with your problem. – Patrice Dec 28 '17 at 14:39

1 Answers1

3

First of all some clarifications.

You wrote:

We have master which makes a pull request from dev every end of Sprint using a TAG with the name of the Sprint.

Pull requests are not made from branches but from someone of your team for example. Furthermore tags are not used to create pull requests but to mark a specific commit (i.e. merge commit). If you are using gitflow I recommend using git flow release (see git-flow cheatsheet) to create releases at the end of a sprint.

  1. When dev need to issue a pull request from one of our plugin branches? Every time there is a push into "my plugin" branch?

Usually you will create a pull request from feature branch to develop branch as soon as the feature branch is ready to be merged into develop branch (i.e. feature fulfills definition of done).

  1. If a Developer is working on plugin02 and merge into dev, how can I get the changes also into plugin04 branch?

You will get the changes into plugin04 branch by merging dev branch into plugin04 branch.

  1. Final, if someone works straight on master, like for an emergency bug, how can we re-sync all sub branches? Does this happen when we issue pull request?

In this case according gitflow a hotfix branch has to be created that will then be merged back into master and dev (see git-flow cheatsheet). As the hotfix will be merged back into dev you can just merge dev branch into your feature branches.

rufer7
  • 3,369
  • 3
  • 22
  • 28
  • Perfect, you just explained exactly what I was looking for, especially the difference between merging between feature branches and pull request Kudo – Raffaeu Dec 28 '17 at 14:36