I was tired of always typing in the same commands to update my GitHub forks so I added this small shell script in /usr/local/bin (so it’s accessible from everywhere):
git fetch upstream
git merge upstream/master
git push origin master
So I can update my master branch quickly. I always work in feature branches so the merge from upstream is always a fast forward.
I named it update-master. Don’t forget to chmod 755.