As @Will-Vousden suggests, it would be possible to write a shell script to do this. For example:
#!/bin/bash
git commit -a -m "$1"
git checkout master
git merge work
git checkout work
which you would call like:
$ git-commit.sh "Commit message in quotes"
However, this approach (or your own alias) could easily fail if there is, for example, a merge conflict:
$ git-commit.sh "Commit message in quotes"
[work 1a6e17f] Commit message in quotes
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Auto-merging file.txt
CONFLICT (content): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.
file.txt: needs merge
error: you need to resolve your current index first
leaving you in the master branch with an unresolved merge conflict.
You could probably add some logic into the script to detect -- and potentially work round -- such issues, but that sounds like much more work and effort than just running the four separate commands!