You can use one of the gist CLI clients. I can recommend the first one, written in Ruby.
Install the gist CLI client:
gem install gist
For OS X, you can install even from Homebrew:
brew install gist
Associate it with your account (it doesn’t store your credentials, it just uses them to get an OAuth2 token):
gist --login
Then you can simply create a gist from command line, for example:
git diff <commit>..<commit> | gist -f foo.diff
and it will give you URL of the created gist.