git checkout -b <JIRA ID>
|
Develop Your Code and Your TestsWe recommend developing your code and your tests in parallel. Your PTL tests should provide good coverage of the requirements and your design. Put License Text in Headers for Code and TestsIf you create new source or test files, make sure that this license text is in the header for all code and test files. Get Approval for Your Code and TestsYour code is ready to commit when the following are true: - The code adheres to our coding standards
- You have approval from two people: one maintainer and one other contributor (who can be a maintainer); approvals must be posted in the development forum, not the wiki
- Complete the development on your newly created branch.
Tip: Commit often, perfect later. - Push the development branch to your fork. By convention, 'origin' points to your forked repository on GitHub:
git push origin <JIRA ID> |
- Repeat the above steps until you are satisfied with your code change.
Fetch changes made to the golden repository by other contributors. By convention, 'upstream' points to the golden repository on GitHub: Rebase your development branch with new changes from the golden repository's master. 'upstream/master' is the remote tracking branch for the golden repository's (upstream's) master branch, on your local machine: git checkout <JIRA ID>
git rebase upstream/master |
- If there are conflicts, Git will throw an error message informing you so and ask you to resolve it before continuing the rebase.
- Resolve conflicts the same way you resolve an ordinary merge conflict in Git. Here's a way to resolve conflicts from the command line.
Then, just continue the rebase operation: If the conflict is complex or problematic, you can abort the current rebase operation instead of continuing, and come back to it later:
- After the rebase is complete, you might want to clean up your branch's commit history:
Squash all your commits into fewer, meaningful change commits (just one suffices if the code change is small enough). git checkout <JIRA ID> git rebase -i --fork-point master |
Write meaningful commit messages for your commits while doing the squash above. You can also use git commit --amend or rebase if you'd rather do it later.
Finally, push the polished branch to your fork. Because you did a git rebase, you'll need to do a force push. git push -f origin <JIRA ID>
|
- Look at the checklist for developing code.
- Your code changes are good to go! Go ahead and create a pull request.
|