Page tree
Skip to end of metadata
Go to start of metadata

This guide explains how we use Bitbucket to get code, check code in, merge, branch, and do code reviews. This is NOT a git tutorial. Read https://www.atlassian.com/git or the tutorial of your choice to get comfortable with git.

Get (clone) the repository the first time:

  1. Open the project in Bitbucket

  2. Click on the repository of interest. Then click the 'Clone' button. You should see an https URL. Remember this URL.
  3. Go to the machine where you want the. Create a directory for the repository.
  4. cd into your new repository.
  5. type 'git clone https://the_url_from_step_2.com'.  You will be prompted for your ECC password.

Create a branch for a code change that will be reviewed:

*** NOTE: Code reviews are done when you merge one branch into another. So you must create a branch to enable code reviews. ***

  1. Create a ticket in JIRA for your code change. Go to that ticket. You'll see a "Create branch" link on the right under 'Development.'
  2. Click 'Create branch'. You'll get a new page with the branch information:
  3. Make sure you are branching the right repository!
  4. Make sure you are branching from the correct branch!
  5. Click the 'Create branch' button.
  6. You should see the branch in in the ticket:
  7. You should also see the branch in stash

  8. Make sure you pull these repository changes from stash, change to the correct branch, and check your code in there.

Get your code reviewed before merging into the main branch

  1. Make sure you've pushed your branch changes to stash. You should see some new commits for the branch in stash:
  2. Create a pull request. Click the 'Pull Request' button on the upper right:
  3. Select the the source branch and the destination branch:
  4. Make sure to specify a reviewer in the 'Reviewers' section:
  5. Click the 'Create pull request'.

Reviewing someone else's pull request

  1. You will be be notified via email when you are a reviewer. You can find pull requests under the 'Pull requests tab of the the Bitbucket website
  2. Review the differences. Add comments if you think there are things that need to be fixed. You can decline a merge if more changes need to be made.

Reopening a merge request

Fixes that are checked in won't show up in a declined merge request. You don't need to create a new merge request, however. You just need to reopen the one you have once your fixes have been checked into the appropriate branch. The new diff will show your updates.

Merging after review

Once you are done reviewing the code, it's time to merge.

 

There is no content with the specified labels

  • No labels