You can try this:
git pull --rebase upstream master
This will rebase your commits on top of upstream commits.
Here is an illustration of what it does.
Your local repository:
* bbbbbbb (HEAD, master) My changes.
* aaaaaaa Initial commit.
Upstream repository:
* ccccccc (upstream/master) Their changes.
* aaaaaaa Initial commit.
After git pull --rebase upstream master
:
* bbbbbbb (HEAD, master) My changes.
* ccccccc (upstream/master) Their changes.
* aaaaaaa Initial commit.