Last Updated: February 25, 2016
·
397
· gilles-leblanc

Shell Script to update fork

I was tired of always typing in the same commands so I added this small shell script in /usr/local/bin (so it’s accessible from everywhere):

git fetch upstream
git merge upstream/master

So I can update my master branch of a fork quickly.

You could also add:

git push origin master

Don’t forget to chmod 755.

I named it update.sh.