ITK/Contribute: Difference between revisions

From KitwarePublic
< ITK
Jump to navigationJump to search
(No difference)

Revision as of 21:04, 11 February 2012

Best practices process for contributing to ITK.

Bugs/Feature enhancements best practices guide

  1. Determine if the contribution is already listed in the bug tracker: http://issues.itk.org
  2. Add proposed contribution (if necessary) and assign it to yourself (NOTE THE BUG ID link i.e. 2287)
  3. Create a new branch called "BUG2287" from the updated git ITK master branch
  4. Make proposed changes on branch "BUG2287", thoroughly test changes, submit dashboard indicating (NOTE THE DASHBOARD link )
  5. Merge BUG2287 branch into master, commit changes with a comment that includes both the BUGID and link to dashboard indicating that the contribution introduces no new errors.
  6. Close the JIRA issue, and include the commit hash key as a comment when closing.

Example

To update the ITK version number, the follow process could be followed:

Create a JIRA issue stating what you want to accomplish. Assign issue to yourself.

git fetch origin
git checkout master
git branch BUG0011074
git checkout BUG0011074
vim CMakeLists.txt   # Edit to change the version number
git add CMakeLists.txt
git commit
git checkout master
git merge BUG0011074
git push origin
git branch -d BUG0011074

Close the JIRA issue with reference to the commit hash key.

Changing commit history

Git has some powerful tools to refactor the commit history. For example,

git commit --amend

can be used to change the content or commit message from the last commit.

git rebase -i

can be used to merge incremental commits into logical units.

These can be very convenient functions, but they should only be used on a local repository before the changes have been published to a public location.