git merge origin/master
git reset origin/master
git commit -am "squash" # might need some extra fixup if your branch has added files
No need to make a temp branch. I know there's probably a more efficient way of doing this, but this is what's stuck in my head.A nicer way is merge master into your branch, with the rebase option (you can set that option as the default). This will put your changes on top of the master changes that happened during populating your own branch. There you solve any conflicts and those usually immediately show you what happened in the meantime, making it easier to do so. The latest greatest now sits in your branch.
Then as a plus, you can retest that merge and if necessary, fix the merge.
Optionally you can do a pull request for reviewing. The diff the reviewers see is conflict-less and makes sense, has only your changes.
Then simply merge to master, which should be trivial if you don't wait for long.