We recently onboarded ranger committers as reviewers on GitHub. Contributions initiated via a GitHub PR are now welcome. Here is how to navigate the process of raising a PR:

Initial Setup

  1. Initiate a fork of apache/ranger. Note: A single fork is sufficient enough to be used for all development purposes.

  2. git clone your fork in your local. This automatically creates a remote called origin.

  3. Setting your upstream:

    1. git remote add upstream https://github.com/apache/ranger.git 
    2. git remote set-url --push upstream disallowed (Optional: to prevent inadvertent push to apache master) 
    3. git remote -v (Optional: to check your remote configs) 
    4. git fetch upstream 

Feature Development

  1. If you’re working on a feature RANGER-XXX, you may create a local branch with

    1. git checkout -b RANGER-XXX --track upstream/master
  2. Do local changes and commit locally with

    1. git commit -m "RANGER-XXX: <Commit Message>" 
  3. Push your commits to your fork with

    1. git push origin HEAD:RANGER-XXX 
    2. Use git status  to check whether your branch is tracking an upstream one.
    3. This creates a new remote branch named RANGER-XXX on your fork and an option to create a PR is now visible.

    4. The same command can be used to push subsequent commits, the PR automatically reflects the change if one exists.

  4. Add reviewers(existing committers) and add yourself as an assignee.

  5. Provide a description of the changes and testing performed in the template.

  6. To checkout PRs locally for review:

Merge & Rebase (Coming soon)

Merge

When the upstream master has moved ahead, it is time to bring in the changes via a merge. This can be done using git merge master. Conflicts may need to be resolved.


Rebase



  • No labels