ITK/Contribute: Difference between revisions
From KitwarePublic
< ITK
Jump to navigationJump to search
Daviddoria (talk | contribs) m (moved ITKContribute to ITK/Contribute) |
Hjmjohnson (talk | contribs) |
||
Line 4: | Line 4: | ||
# Determine if the contribution is already listed in the bug tracker: http://issues.itk.org | # Determine if the contribution is already listed in the bug tracker: http://issues.itk.org | ||
# Add proposed contribution (if necessary) and assign it to yourself (NOTE THE BUG ID link i.e. 2287) | # Add proposed contribution (if necessary) and assign it to yourself (NOTE THE BUG ID link i.e. ITK-2287) | ||
# Create a new branch called " | # Create a new branch called "ITK-2287" from the updated git ITK master branch | ||
# Make proposed changes on branch " | # Make proposed changes on branch "ITK-2287", thoroughly test changes, submit dashboard indicating (NOTE THE DASHBOARD link ) | ||
# Merge | # Merge ITK-2287 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. | ||
# Close the JIRA issue, and include the commit hash key as a comment when closing. | # Close the JIRA issue, and include the commit hash key as a comment when closing. | ||
Line 20: | Line 20: | ||
git fetch origin | git fetch origin | ||
git checkout master | git checkout master | ||
git branch | git branch ITK-2287 | ||
git checkout | git checkout ITK-2287 | ||
vim CMakeLists.txt # Edit to change the version number | vim CMakeLists.txt # Edit to change the version number | ||
git add CMakeLists.txt | git add CMakeLists.txt | ||
git commit | git commit -m"BUG: Issue resolved for bug ITK-2287" | ||
git checkout master | git checkout master | ||
git merge | git merge ITK-2287 | ||
git push origin | git push origin | ||
git branch -d | git branch -d ITK-2287 | ||
</pre> | </pre> | ||
Revision as of 13:05, 8 June 2013
Best practices process for contributing to ITK.
Bugs/Feature enhancements best practices guide
- Determine if the contribution is already listed in the bug tracker: http://issues.itk.org
- Add proposed contribution (if necessary) and assign it to yourself (NOTE THE BUG ID link i.e. ITK-2287)
- Create a new branch called "ITK-2287" from the updated git ITK master branch
- Make proposed changes on branch "ITK-2287", thoroughly test changes, submit dashboard indicating (NOTE THE DASHBOARD link )
- Merge ITK-2287 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.
- 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 ITK-2287 git checkout ITK-2287 vim CMakeLists.txt # Edit to change the version number git add CMakeLists.txt git commit -m"BUG: Issue resolved for bug ITK-2287" git checkout master git merge ITK-2287 git push origin git branch -d ITK-2287
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.