...
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.
...
Step-by-Step Set-up Guide
Fork the code on Bitbucket - configure your fork
- Sign up for a free account on Bitbucket using an "edu" address if you have one.
- Set up ssh for git to avoid having to enter your password every time you interact with Bitbucket using git. See: Set up SSH for Git.
- Using your Bitbucket account, fork the team repository: https://bitbucket.org/lorainelab/integrated-genome-browser
- Configure your fork to link to team project management software JIRA.
- Log into Bitbucket
- Go to your fork home page
- Select "Settings > Links > Add new link"
- Choose Link type "Jira"
- Enter Link url https://jira.transvar.org/
- Enter Link key IGBF
- Check that the links work - select "Commits"
- Look for commit messages containing the Link key "IGBF"
- Note that all link keys now link out to JIRA
...
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.
Clone your fork and add team repository as an upstream
- Clone a copy of your forked IGB repository onto your computer using your favorite git client software.
- Add the team repository as a remote called "upstream" (the convention.)
...
Code Block | ||
---|---|---|
| ||
git remote add upstream git@bitbucket.org:lorainelab/integrated-genome-browser.git |
Start work - make a branch
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.
...
where IGBF-1234 is the name of the new branch.
Edit code, commit to your clone, push to your fork
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.
...
Code Block |
---|
git commit -m "IGBF-1234 Fix typo - covfefe not collusion" |
Synchronize early & often with the main repository
If the main development branch changes, you must obtain those changes and test them with your branch.
...
Code Block |
---|
git checkout master git pull upstream master git push origin master |
Rebase your branch
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.
...
Code Block |
---|
git push origin IGBF-1234 |
Make a pull request - PR
To request that your edits be incorporated into the team repository, you need to make a pull request (PR).
...