Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Quick Summary: Developers fork the team repository on Bitbucket. When working on a bug fix or new feature, they create a topic branch specific to that task. They push their branch to their fork for review and testing. When all is done, they submit a pull request from the topic branch on their fork to the master main-JDK8 branch on the team repository. When working on a task recorded in the IGB JIRA system, they include the corresponding JIRA number (e.g., IGBF-1234) in the branch name and every commit to that branch. 

...

First step is to update your fork's copy of the master branchmain-JDK8 branch. The easiest way to do this is to use the Bitbucket interface.

...

If all goes well, your fork will then receive all the commits present on the master branch main-JDK8 branch on the team repository. To check that it worked, just review the commit history on your fork and compare it to the team repository. 

Note: the Sync button appears only if your fork lacks commits present on the team repository's master main-JDK8 branch.  By default, Bitbucket shows you the master main-JDK8 branch. 

You can also update your fork's master main-JDK8 branch from the command line. For that, check out your master main-JDK8 branch on your clone and pull changes from the master branch main-JDK8 branch from the team repository, aliased to "upstream." Then, push the changes to your fork. 

For example:

Code Block
git checkout mastermain-JDK8
git pull upstream mastermain-JDK8
git push origin mastermain-JDK8

Rebase your branch

After updating your clone and fork with the latest changes to the master main-JDK8 branch, you'll need to test how those new commits interact with your topic branch. You should use "rebase" commands to do this. This will move the "base" of your topic branch to the latest commit on the master branchmain-JDK8 branch

To rebase your branch on the latest mastermain-JDK8, switch back to the master branchmain-JDK8 branch, update it with any new commits, check out your feature branch, and rebase. 

For example, let's assume you have committed all your work to your topic branch - called IGBF-1234 in this example. Then run:

Code Block
git checkout mastermain-JDK8
git pull origin mastermain-JDK8 # assumes your fork is up-to-date
git checkout IGBF-1234
git rebase mastermain-JDK8

Next, push your newly rebased branch to "origin" (your fork) to update it:

...

  • Log in to your Bitbucket account.
  • Go to your fork and select "Branches"
  • Under "Pull request" select "Create" next to your branch
  • A form will appear. Fill in the fields:
    • Select your fork and your branch as the pull request source (left side).
    • Select the team repository (lorainelab) and master main-JDK8 branch as the pull request target (right side) 
    • Click Create pull request

...

  • If you make changes to your branch (the source of the PR), those changes will be reflected in the PR. You do not need to create a new PR if you add new commits or otherwise modify your branch. 
  • You should always rebase onto the latest master branch main-JDK8 branch before submitting a PR. 
  • Please squash all your commits into one single commit, unless you have a very good reason not to. This ensures that we can easily apply your changes to other branches if required. It also makes code review easier. 
  • The project admins get email notifications whenever someone submits a PR. However, if you do not hear anything about your PR, get in touch.  

...