Create a local feature branch based off master.
- git checkout master
- git pull
- git checkout -b <branch-name>
Rebase frequently to incorporate upstream changes.
- git fetch origin
- git rebase origin/master
Resolve conflicts. When feature is complete and tests pass, stage the changes.
- git add --all
When you've staged the changes, commit them.
- git status
- git commit --verbose
Write a good commit message. Example format:
- Present-tense summary under 50 characters
- * More information about commit (under 72 characters).
- * More information about commit (under 72 characters).
- http://project.management-system.com/ticket/123
If you've created more than one commit, use
interactively to squash them into cohesive commits with good messages:
- git rebase
- git rebase -i origin/master
Share your branch.
- git push origin <branch-name>
Submit a GitHub pull request.
Ask for a code review in the project's chat room.
来源: http://www.cnblogs.com/jager/p/6684637.html