THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Every commit in your feature branch should have an associated
AMBARI-XXXXX
JIRA. This way, when your branch is merged back into trunk, the commit history follows Ambari's conventions. Merge frequently from trunk into your branch to keep your branch up-to-date and lessen the number of potential merge conflicts.
Do NOT squash commits. Every commit in your feature branch must have an
AMBARI-XXXXX
association with it.
Review Board Process
- Every commit being made to the feature branch must still go through the code review process. As such, it should have an associated
AMBARI-XXXXX
JIRA. - The commits, however, do not need to be "fully functional". Since the goal of the feature branch is to make smaller, iterative updates, the commit may cause another area of the product to be temporarily broken.
- Unit tests are not required for feature branch commits. However, they are required before merging the feature back into
trunk
. At the very least, at least 1 feature branch commit must include the test coverage which exercises the changes being made in the branch.
Branch Removal
- Once a feature has been completed and the branch has been merged into trunk, the branch can be safely removed. Feature branches should only exist while the work is still in progress.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ git checkout branch-feature-AMBARI-12345 Switched to branch 'branch-feature-AMBARI-18456' $ git merge trunk Updating ed28ff4..3ab2a7c Fast-forward ambari-server/include.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ambari-server/include.xml |
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ git checkout trunk Switched to branch 'trunk' $ git branch -d branch-feature-AMBARI-12345 Deleted branch branch-feature-AMBARI-12345 (was ed28ff4). $ git push origin --delete branch-feature-AMBARI-12345 To https://git-wip-us.apache.org/repos/asf/ambari.git - [deleted] branch-feature-AMBARI-12345 $ git remote update origin --prune Fetching origin From https://git-wip-us.apache.org/repos/asf/ambari x [deleted] (none) -> branch-feature-AMBARI-56789 |
- Cleanup the branch when done., both locally and remotely
- Prune your local branches which no longer track remote branches
...