...
Clone a copy of your forked IGB repository onto your computer. You will make changes to your local clone, commit them to your local repository, and then ultimately push your changes to your fork hosted on Bitbucket.
To clone your fork, use git clone with the address of your remote fork. (Copy the address from your fork's Overview page at Bitbucket.)
For example, if your fork is named my-igb-fork, you would execute
:
Code Block | ||
---|---|---|
| ||
git clone <ADDRESS> |
where ADDRESS is the address of your fork on Bitbucket. To get the address of your fork, look at the top the top right of your fork's home s Overview page on Bitbucket.
Make a branch
...
- Go to your fork's project Overview page
- Select Create Pull Request
A Pull pull request form will appear. Fill in the fields:
...
Keep your fork in sync with the main repository
Bitbucket has utilities to help you pull in the latest code when you are working in their web application (If the main development branch changes, you should merge in those changes to your fork. Bitbucket has utilities that make this easy - see https://blog.bitbucket.org/2013/02/04/syncing-and-merging-come-to-bitbucket/). However, you will likely want to use the command line to keep your branch in sync with the remote branch you are tracking. The details about how this works are outside the scope of this article; however, we provide a simple example for your reference.
Example
The following example assumes we followed the workflow above and are working on a development branch named igb_8_3.
To bring our a remote fork up-to-date with a development branch:
- Add the original, main IGB repository as a remote git repo with the alias "upstream"
...
Fetch and merge changes from upstream for the a development branch named (e.g., igb_8_3.5) using pull or rebase commands
Code Block |
---|
git pull upstream igb_8_3 |
...
BRANCH |
or
Code Block |
---|
git pull --rebase upstream igb_8_3 |
- After fetching and merging the content from upstream, the final step is to push Push these changes back to your fork (assumed aliased to be aliased as "origin" in this example)
Code Block |
---|
git push origin igb_8_3 |
...