To develop IGB and the IGB API, the core IGB development team uses the Forking and Feature Branch Workflows described in https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
How this works: When working on a bug fix or new feature, you should create a topic branch specific to that task. When done, submit a pull request from that topic branch to the master branch on the team repository. If working on a task recorded in the IGB JIRA system, always include the corresponding JIRA number (e.g., IGBF-1234) in the branch name and every commit to that branch. Also, before submitting a pull request, rebase your branch onto the latest tip of the master branch. Please rebase instead of merging to help simplify the commit history and make the project easier to maintain.
Note: Users with ".edu" accounts get more Bitbucket pipeline build minutes. If you are developing the Core IGB code base, you will need this to build branch-specific installers for testing.
For example:
git remote add upstream git@bitbucket.org:lorainelab/integrated-genome-browser.git |
Before you start work on a new feature, bug fix, or other improvement, create a new branch for the changes you intend to make. This new branch is called a "topic branch" and should only address one specific, discrete feature or bug fix.
Important: If you are working on a task captured in the IGB JIRA project, include the JIRA issue number in the branch name. This enables JIRA and Bitbcuket to create links to each other. c
For example:
git checkout -b IGBF-1234 |
where IGBF-1234 is the name of the new branch.
Edit your code, test it locally, commit your changes to your local copy, and then push them to your fork hosted on Bitbucket. If working on a JIRA issue, always include the JIRA ticket name in the commit.
For example:
git commit -m "IGBF-1234 Fix typo - covfefe not collusion" |
If the main development branch changes, you must obtain those changes and test them with your branch.
First step is to update your fork's copy the master branch. The easiest way to do this is to use the Bitbucket interface.
To synchronize your fork using the Bitbucket interface:
Note: the Sync button appears only if your fork lacks commits present on the team repository's master branch. By default, Bitbucket shows you the master branch.
You can also update your fork's master branch from the command line. For that, check out your master branch on your clone and pull changes from the master branch from the team repository, aliased to "upstream." Then, push the changes to your fork.
For example:
git checkout master git pull upstream master git push origin master |
After updating your clone and fork with the latest changes to the master 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 branch.
To rebase your branch on the latest master, switch back to the master branch, update it with any new commits, check out your feature branch, and rebase. synchronize your fork's master branch with the team repository (see above), 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:
git checkout master git pull origin master # assumes your fork is up-to-date git checkout IGBF-1234 git rebase master |
Next, push your newly rebased branch to "origin" (your fork) to update it:
git push origin IGBF-1234 |
To request that your edits be incorporated into the team repository, you need to make a pull request (PR).
To make a PR using the Bitbucket UI:
Things you need to know about PRs: