$ git pull --rebase upstream master will work also when there are commits on master branch - it will just rebase the changes seamlessly in opposite to git merge. Moreover by using git pull --rebase we will save two calls of git.