This post describes the best practices for asterics in branch management.
Creating a new branch
Branches are created at the head of
dev as follows (within asterics repository):
git checkout dev git pull git branch dev-new git checkout dev-new git branch --set-upstream-to origin/dev-new
Merging a branch
Feature branches are merged into
dev when they reach a stable state. Before merging, ensures that R tests are all successfull (start a new R session at the project root and proceed as described here.
When you decide to merge, go to the ASTERICS project on ForgeMIA, into the menu (on the left) Repository/Branches and click on the "Merge request" button of the branch that you want to merge (be careful to ask for a merge into
dev and not another branch). Once the merge resquest is performed, ask for someone else to review your code and to perform the merge (this is a two-step process during which you first have to review and correct possible conflicts and then to approve the merge).
Deleting a branch
The person merging its branch into
dev is responsible for deleting his/her branch locally and remotely (after it has been merged and pushed):
git branch -d dev-new git push origin --delete dev-new
If this change is not properly spread with
pull on a local repository, you can check which branches are present (with
git branch -a) and if they fit the branches as described on the forge. If not, delete the branch locally (as described above) and prune its remote counterpart:
git remote update --prune