Add this in your path as git-up
and git-reup
(symbolic link) and it amps up your git pull
by means of git up
- Adds in a list of the commits you're pulling down
- Auto-prunes remote branches
- Defaults to
pull --rebase
- gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.
Kyle Neath, Ryan Tomayko and then Zach Holman basically figured out how to do this. TheSpyder found a small error on case sensitive file systems.
Your script doesn't work on case sensitive file systems - just replace the two calls to
git rev-parse head
withgit rev-parse HEAD
:)