Chinaunix首页 | 论坛 | 博客
  • 博客访问: 25226
  • 博文数量: 9
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-06 22:40
文章分类

全部博文(9)

文章存档

2014年(9)

我的朋友

分类: LINUX

2014-03-22 22:03:50

原文地址:git 发送patch给别人 作者:T-Bagwell

首先设置一下本地的mail客户端,用的msmtp

  1. # Example for a user configuration file
  2. # Set default values for all following accounts.
  3. defaults
  4. tls on
  5. tls_trust_file /etc/pki/tls/certs/ca-bundle.crt
  6. logfile ~/.msmtp.log
  7. # My email service
  8. account gmail
  9. host smtp.gmail.com
  10. port 25
  11. from lingjiujianke@gmail.com
  12. auth login
  13. user lingjiujianke@gmail.com
  14. password ********
  15. # Set a default account
  16. account default : gmail
然后设置git-send-mail的配置
  1. [sendemail]
  2.         smtpencryption = tls
  3.         smtpuser = lingjiujianke@gmail.com
  4.         smtpserverport = 587
  5.     smtpserver="/usr/bin/msmtp"
  6. [user]
  7.     name = LiuQi
  8.     email = lingjiujianke@gmail.com

  9. [format]
  10.        headers = "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\n"
然后作patch发送

  1. LLL/0001-init.patch
  2. LLL/0002-first-commit.patch
  3. LLL/0003-Helloworld.patch
  4. LLL/0004-Helloworld1.patch
  5. Who should the emails appear to be from? [LiuQi <lingjiujianke@gmail.com>]
  6. Emails will be sent from: LiuQi <lingjiujianke@gmail.com>
  7. Who should the emails be sent to? lingjiujianke@gmail.com
  8. Message-ID to be used as In-Reply-To for the first email?
  9. (mbox) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'From: LiuQi <lingjiujianke@gmail.com>'
  10. (body) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'Signed-off-by: LiuQi <lingjiujianke@gmail.com>'

  11. From: LiuQi <lingjiujianke@gmail.com>
  12. To: lingjiujianke@gmail.com
  13. Subject: [PATCH 1/4] init
  14. Date: Wed, 31 Aug 2011 11:47:26 +0800
  15. Message-Id: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>
  16. X-Mailer: git-send-email 1.7.6.1

  17.     The Cc list above has been expanded by additional
  18.     addresses found in the patch commit message. By default
  19.     send-email prompts before sending whenever this occurs.
  20.     This behavior is controlled by the sendemail.confirm
  21.     configuration setting.

  22.     For additional information, run 'git send-email --help'.
  23.     To retain the current behavior, but squelch this message,
  24.     run 'git config --global sendemail.confirm auto'.

  25. Send this email? ([y]es|[n]o|[q]uit|[a]ll): a
  26. OK. Log says:
  27. Sendmail: /usr/bin/msmtp -i lingjiujianke@gmail.com
  28. From: LiuQi <lingjiujianke@gmail.com>
  29. To: lingjiujianke@gmail.com
  30. Subject: [PATCH 1/4] init
  31. Date: Wed, 31 Aug 2011 11:47:26 +0800
  32. Message-Id: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>
  33. X-Mailer: git-send-email 1.7.6.1

  34. Result: OK
  35. In git 1.7.0, the default has changed to --no-chain-reply-to
  36. Set sendemail.chainreplyto configuration variable to true if
  37. you want to keep --chain-reply-to as your default.
  38. (mbox) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'From: LiuQi <lingjiujianke@gmail.com>'
  39. (body) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'Signed-off-by: LiuQi <lingjiujianke@gmail.com>'
  40. OK. Log says:
  41. Sendmail: /usr/bin/msmtp -i lingjiujianke@gmail.com
  42. From: LiuQi <lingjiujianke@gmail.com>
  43. To: lingjiujianke@gmail.com
  44. Subject: [PATCH 2/4] first commit
  45. Date: Wed, 31 Aug 2011 11:47:27 +0800
  46. Message-Id: <1314762449-595-2-git-send-email-lingjiujianke@gmail.com>
  47. X-Mailer: git-send-email 1.7.6.1
  48. In-Reply-To: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>
  49. References: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>

  50. Result: OK
  51. (mbox) Adding cc: liuqi <liuqi@aaa.(none)> from line 'From: liuqi <liuqi@aaa.(none)>'
  52. (body) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'Signed-off-by: LiuQi <lingjiujianke@gmail.com>'
  53. OK. Log says:
  54. Sendmail: /usr/bin/msmtp -i lingjiujianke@gmail.com liuqi@aaa.(none)
  55. From: LiuQi <lingjiujianke@gmail.com>
  56. To: lingjiujianke@gmail.com
  57. Cc: liuqi <liuqi@aaa.(none)>
  58. Subject: [PATCH 3/4] Helloworld
  59. Date: Wed, 31 Aug 2011 11:47:28 +0800
  60. Message-Id: <1314762449-595-3-git-send-email-lingjiujianke@gmail.com>
  61. X-Mailer: git-send-email 1.7.6.1
  62. In-Reply-To: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>
  63. References: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>

  64. Result: OK
  65. (mbox) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'From: LiuQi <lingjiujianke@gmail.com>'
  66. (body) Adding cc: LiuQi <lingjiujianke@gmail.com> from line 'Signed-off-by: LiuQi <lingjiujianke@gmail.com>'
  67. OK. Log says:
  68. Sendmail: /usr/bin/msmtp -i lingjiujianke@gmail.com
  69. From: LiuQi <lingjiujianke@gmail.com>
  70. To: lingjiujianke@gmail.com
  71. Subject: [PATCH 4/4] Helloworld1
  72. Date: Wed, 31 Aug 2011 11:47:29 +0800
  73. Message-Id: <1314762449-595-4-git-send-email-lingjiujianke@gmail.com>
  74. X-Mailer: git-send-email 1.7.6.1
  75. In-Reply-To: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>
  76. References: <1314762449-595-1-git-send-email-lingjiujianke@gmail.com>

  77. Result: OK









阅读(1371) | 评论(0) | 转发(0) |
0

上一篇:使用git加管道操作

下一篇:Git Tips

给主人留下些什么吧!~~