A .git/config snippet
[alias] publish = !git push && ssh host ‘cd /path/to/project && echo Publishing… && git pull’