Skip to content

Commit 121f693

Browse files
authored
Merge pull request #36 from geerteltink/docs/merg-ups
Describe automatically create merge-up branches
2 parents 255e892 + 8cc3e6f commit 121f693

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,34 +77,39 @@ the current default release branch via merge-ups.
7777
### Releasing
7878

7979
When releasing a new version `x.y.z`, a new branch will be created `x.y+1.z` and will be set as the next
80-
default release branch.
80+
default release branch. If a hotfix `x.y.z+1` is released, a merge-up branch is automatically created.
8181

8282
### Synchronizing branches
8383

8484
To keep branches synchronized merge-ups are used.
8585

8686
That consists in getting the changes of a specific released branch merged all the way up to the current
8787
default branch. This ensures that all release branches are up-to-date and will never present a bug which
88-
has already been fixed.
88+
has already been fixed. Merge-up branches are automatically created but needs to be merged manually into
89+
the targeted branch.
8990

9091
**Example**
9192

9293
Let's say we've released the versions `1.0.0` and `1.1.0`.
9394
New features are being developed on `1.2.x`.
9495
After a couple weeks, a bug was found on version `1.0.0`.
9596

96-
The fix for that bug should be done based on the branch `1.0.x` and, once merged, the branches should be updated in this way:
97+
The fix for that bug should be done based on the branch `1.0.x` and, once merged, the branches should be updated
98+
in this way:
9799

98-
1. Create a branch from the fixed `1.0.x` (`git checkout 1.0.x && git checkout -b merge-up/1.0.x-into-1.1.x`)
99-
1. Create a PR using `1.1.x` as destination
100-
1. Create a branch from the fixed `1.1.x` (`git checkout 1.1.x && git checkout -b merge-up/1.1.x-into-1.2.x`)
101-
1. Create a PR using `1.2.x` as destination
100+
1. Create a PR for the automatically created branch `1.0.x-merge-up-into-1.1.x_*`, using `1.1.x` as destination.
101+
1. Merge the new PR into `1.1.x`.
102+
1. Create a PR for the automatically created branch `1.1.x-merge-up-into-1.2.x_*`, using `1.2.x` as destination.
103+
1. Merge the new PR into `1.2.x`.
102104

103105
:warning: when the merge-up can't be merged due to conflicts, it needs to be synced with the destination branch.
104106
That's done by merging the destination into the merge-up branch and resolving the conflicts locally:
105107

106-
1. Checkout to merge-up branch (`git checkout -b merge-up/1.1.x-into-1.2.x`)
108+
1. Update your local repository (`git fetch origin`)
109+
1. Checkout to merge-up branch (`git checkout 1.1.x-merge-up-into-1.2.x_*`)
107110
1. Sync merge-up branch (`git merge --no-ff origin/1.2.x`)
108111
1. Solve conflicts (using `git mergetool` or through an IDE)
109112
1. Resume merge (`git merge --continue`)
110113
1. Push (`git push`)
114+
115+
If needed you can create a merge-up branch manually: `git checkout 1.0.x && git checkout -b 1.0.x-merge-up-into-1.1.x`

0 commit comments

Comments
 (0)