0

For example, Gitlab indicates that the develop branch is behind master:

Example 1

enter image description here

Example 2

enter image description here

One could make a merge request from master to develop, but as there are no code changes it seems impossible to align these branches.

The current approach is to remove the develop branch once in a while and to create it again in order to get 0 | 0 again.

The 1|0 means that this branch is 1 behind the master branch, 5|0 means 5 commits behind the master branch and 2|3 means two behind master branch and 3 ahead.

Branching strategy

  1. The develop is branched from the master, i.e. 0|0
  2. A feature branch is created from the develop
  3. When the feature is ready the code from the feature branch will be merged into the develop
  4. A release branch is created from the develop branch
  5. The release branch will be merged into master
  • 4
    Could you explain what 0 | 0 or 5 | 0 means? Also: what kind of branching strategy are you using: When do you merge into master? Are you using merge commits, or fast-forward merges that don't create a new commit? – amon May 26 '17 at 10:24
  • 3
    can you explain your branching strategy more? development branches should never be behind master unless you have multiple paths to master that don't go through development. re-branching dev to get in sync isn't a bad thing, but its usually because dev gets too many orphaned changes that don't and shouldn't ever get merged. – Ryathal May 26 '17 at 11:56
  • @Ryathal the branching strategy has been added to the question – 030 May 26 '17 at 23:13
  • Have a look at Gitflow: nvie.com/posts/a-successful-git-branching-model – Robert Harvey May 27 '17 at 19:16
  • When you want both branches to keep the same state then why do you have mutliple branches? If you want to get changes from A to B and vice versa just merge back and forth. – BlueWizard May 28 '17 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.