Working with Git
This should help you set up your workspace for contributions.
Step 1: Create a Bitbucket account and log-in
Bitbucket is a Git hosting service like Github. You can create yourself an account there free of charge.
Once you’ve done that, ensure that you are logged in on the webfrontend.
Step 2: Fork
Since you won’t be able to work directly on our repository due to not having write permissions, you need to create your own copy of it by making a fork.
On the “Source” page, there is a button with “…”. There should be an option “Fork this repository”
If for some reasons the option is missing, try reloading the website.
Step 3: Work in your repository
No that you have your own version of our data, you can add or modify files. You can either clone it on your local machine or modify the files in the web frontend.
Whenever you commit a change, you are asked to provide a commit message. Please try to use the ticket number for your work item in the commit message headline.
There is one more decision you need to make:
Option A: Work in the master branch
The easy way, recommended if you just have minor changes to make.
The master
branch is automatically synchronized with changes in the project repository. That way you will always have an up-to-date version.
If you work on several issues, you risk all of them being rejected, because one of them is rejected.
Say you work on issue A, commit it and create a pull request. Now it make take some hours/days before it is merged into the project. When you work on another issue B in the meantime and commit it, it is automatically merged with the existing pull request. If the project wants to reject your solution to issue A, but would accept B, it cannot do that
Option B: Work in a dedicated branch per issue
The professional way, recommended if you work on a lot of stuff, especially long-term work items.
You can make dedicated pull requests per issue, each of which can be dealt with individually.
Your branch isn’t automatically synchronized. It is your job to manually synchronize your branch with your master branch
Additional complexity dealing with branches.
Step 4: Create a pull request
Once you finished your work and feel ready to contribute, you can create a pull request.
If you work with dedicated branches, make sure your branch is synchronized with the master branch.
Choose the branch you want to contribute from, chose the projects master branch as a target and add “Stefan Prelle” as a reviewer.
Usually you should have been given an issue number that you should use in the pull requests commit message - like COM6-416 Adding missing quality path ‘Obsession’