Http://www.cnblogs.com/0616--ataozhijia/p/3830698.html
1. Git send-email is included in a individual package, named "Git-email":
$ sudo apt-get install Git-email
2. Configure the SMTP server info after the installation:
$ git config--global sendemail.smtpserver smtp.gmail.com
$ git config--global sendemail.smtpserverport 587
It's ready for the top two.
$ git config--global sendemail.smtpencryption TLS
$ git config--global sendemail.smtpuser your mailbox
3. Start a new branch to does any dev work:
$ dev_branch=fix-warning-for-string-format
$ git Branch $dev _branch
$ git checkout $dev _branch
$ vim source.c
$ git Add source.c
$ git commit-s-M "ADD format strings for Bb_error_msg_and_die"
4. Format a patch and send it out to the receiver:
$ git format-patch-c-n master. $dev _branch
$ git send-email--compose--no-chain-reply-to--suppress-from--to kernel@kernel.org