-
Notifications
You must be signed in to change notification settings - Fork 13
Using a Maintenance Branch
gregjan edited this page Aug 8, 2012
·
3 revisions
This page will show you how to create and use a maintenance branch from any commit or from a release tag.
- check for existing maintenance branch so as not to duplicate
-
git pull
- first update local repository from remote -
git branch -l
- list branches
- find the starting point (commit or tag). Look at the history or tag list to find the starting point you want:
-
git hist
- find commit ids -
git tag -l
- find release tags
- create a new tracked remote branch
-
git checkout --track -b <major version>.x <tag/commit>
, for examplegit checkout --track -b 2.x 2.0
- update POMs to next minor SNAPSHOT version
-
mvn versions:set -DnewVersion=<version+1>-SNAPSHOT -DgenerateBackupPoms=false
(inserts new version into POMs. increment the proper version digit) -
vim pom.xml
- update the cdr-version property in parent POM (updates dependencies) - We will create tags for minor releases, but will use the one maintenance branch per major version.
- fix bugs
- Fix bugs on the branch and commit changes to your local repository.
- Optionally consolidate/squash commits together with
git commit --amend
orgit rebase -i
- Push changes to remote repository
- follow the normal release procedure to deploy a maintenance branch.
-
Commit your fixes on the proper release maintenance branch. (How to release the cdr)
-
Before any major release and at any time prior to that, perform a biased merge from maintenance to master (or major release branch).
-
git checkout <branch>
, where branch is the major branch or master -
git merge -s recursive -X ours <fixes-branch>
(In a conflict this will keep the master change.) - commit the merge, if not done automatically.
- push the major/master branch back to origin