Github

The forks created from existing Github projects into Nordix namespace uses nordix-dev as default/development branch.

master branch is locked in order to use it as a reference to upstream repo in order to make it easier to compare changes against and rebase as needed.

Please ensure you always for against nordix-dev branch, create your local branches from there, and frequently rebase against master branch.

Sending Pull Requests to Nordix Repos

Sending Pull Requests to Upstream Repos


You can experiment with this workflow using Nordix/sandbox repo which is forked from a personal repo fdegir/sandbox for experimentation.

If you find ways to improve the workflow, please do not hesitate to update this page.

Gerrit

If you are working based on Apache licensed upstream project, the work you are doing first needs to land in to Nordix Infrastructure.

In order to achieve this, you should have got the upstream repo imported to Nordix Gerrit so you can do your work in a repo cloned from Nordix. The repos are automatically kept in synch.

When automatic rebase fails

When you run into the situation that you cannot commit in ONAP because a rebase is needed, but the "Rebase" button in Gerrit doesn't work, then rebase your change manually in your local repository.
Note: Cherry-picking a commit on top of a new base is the same as rebasing a commit on top of a new base. It's just a matter of which commit you have checked out before running the command. Cherry-picking is more flexible though and can be used for more than just rebasing.

  1. Fetch the latest changes for all branches from Nordix repo to local repo.
    git fetch
  2. Make sure that latest commit on Nordix master is the same as the latest one on ONAP master. If not, send a mail to the "discuss" mailing list that there might be something wrong with the synch job.
  3. Create a temporary branch
    git checkout -B temp_rebase_branch origin/master
  4. Get the change from Gerrit by using the cherry-pick link on the Gerrit review page in Nordix.
    git fetch https://gerrit.onap.org/r/dcaegen2/collectors/datafile refs/changes/69/67269/2 && git cherry-pick FETCH_HEAD
  5. Resolve the rebase conflicts
    git mergetool
    git cherry-pick --continue
  6. Resubmit to master in Nordix
    git push usptream HEAD:refs/for/master
  7. Move to another branch so the temporary rebase branch can be deleted (git branch shows you the branches you have which you can move to)
    git checkout <some other branch>
  8. Remove the temporary local delivery branch
    git branch –D temp_rebase_branch