Yes. I would suggest that there are several ways to do this, but here is what I do.
So you want to contribute to the repository on github, call this upstream .
On github, you will shell out the upstream repository. Lets call it origin .
Then, on your development machine, you clone origin so that you can work on the code. Lets call it local . When you clone this repository, you most likely already created origin as a remote repository. You also need to add the upstream repository as a remote repository.
Then, when you want to make changes, do not make this change in the master branch. Instead, create a new branch for your changes. iee fix-issue-101
Once you are happy with your changes, you will want to move your changes from the local repository to the origin repository. Now you can create a Pull request for upstream from the fix-issue-101 branch on origin to the master branch on upstream .
You can continue to create branches on local and origin while you expect the Pull request to be accepted, and therefore create additional Pull requests.
When master on upstream has changes, i.e. your Pull request was accepted, you could pull from master to upstream to master to local . Then press master on local on master on origin . After that, the branches of all master repositories will be synchronized.
I hope I wrote this in an understandable manor. If you can not ask questions, and I will update them accordingly.
source share