Git alias for merging in dev branch

When working in a feature branch, if the feature is taking a long time to develop it's often useful to merge in the latest code from the dev branch. I have a git alias set up which allows me to do this very easily.

This is the alias, which you can copy into your .gitconfig:

dev = !git pull origin dev && git merge dev

The usage is very simple:

git dev

This pulls the latest code from the dev branch on the remote origin, and merges it into my current branch. (Note that it does not pull it into the local dev branch, so when you next switch to dev you will still want to run git pull.)