-
Don't make changes to
masterbranch. -
When you see a new issue you can solve, add a comment
on itto the issue. Let's say the issue number isN. -
Do
git checkout mastergit fetch upstreamgit merge upstream/master or if you failed at 0
git reset --hard upstream/mastergit checkout -b fix-issue-N-
Do your thing. Commit.
-
Assuming you've done
Mcommits for this patch. Do
git rebase -i HEAD~MIn the next file that opens, replace all pick words except first one by squash. Save the file.
In the next file, write a commit message for your pr. (Following the PR format). Save the file.
- If above step is successful, do
git checkout master
git fetch upstream
git merge upstream/master
git checkout fix-issue-N
git rebase -i master-
If you see any conflicts, resolve them.
-
Now do
git logto ensure that your branch is just one commit ahead ofupstream/master. -
Do
git diff masterinspect your patch.
git push origin fix-issue-N-
In github, start a pull request. If there are any suggestions, repeat from 6.
-
When your pr is accepted
git checkout master
git branch -D fix-issue-N # deletes the fix-issue-N branch
git push -d fix-issue-N # deletes the fix-issue-N branch at originDrink a coffee!