Priciple: One feature, one PR.
- Make a fork
- Make a new feature branch based on your master branch:
git checkout master,git checkout -b feature-xxx - After finishing new features, add and commit them:
git add .,git commit -m <commit_msg> - Before merging into master, you should make sure your changes are based on upstream/master:
git checkout master,git fetch upstream master - Then switch to feature-xxx,rebase to master:
git checkout feature-xxx,git rebase master - If there are conflicts, please resolve then:
git add <conflict_file>,git rebase --continue - Submit your changes:
git push origin feature-xxx - Make a PR at github, after it is successfully merged, delete this feature branch:
git checkout master,git branch -d feature-xxx,git fetch upstream master