git send-email (multiple patches)
来源:互联网 发布:精品php源码 编辑:程序博客网 时间:2024/05/19 16:47
ref : http://stackoverflow.com/questions/14075445/how-to-generate-separate-patch-files-for-many-local-commits-and-send-them-with
1) Download source code from the git repository:
git clone git://address.of.repository/project/ /folder/path/on/my/computer
2) Create your git branch in the project. this branch will continue all your local commits
git checkout -b <private_branch_name>
3) set your email address and your name for the git commit signature:
git config --global user.name "Your Name"git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
4) Do your modifications on the source code. a new files/folders could be added in the project.
Each modification could be commited alone locally:
5) Before commit the changes. we have to add the new files/folders to the local git repository:
under the project folder of the source code
git add <Newfolder>git add <Newfile>
6) And then commit locally a modification with:
under the project folder of the source code
git commit -a
this will open an interactif window
you can check that commit has detected the edited files and the new files under:
# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)## modified: bin/Makefile.am# modified: configure.ac# new file: src/new.c
under the window of commit -a
, you have to enter comment for your modifications
and then save your commit with Ctrl + O ( WriteOut) and thenEnter
and your commit is become saved now
and then quit the commit -a
window with Ctrl + X (Exit)
Note: You need to put a blank line between comments in order to get the email subject and the email core in your patch file that you will send via eamil
7) After making all the commits for each modification, now you can generate separate patch for each commit with:
under the project folder of the source code
git format-patch --cover-letter -M master -o ../outgoing/
this will generate a patch file for each commit undo the folder outgoing
The generated files in the outgoing folder are letters containing email subject and email core and the patch enclosed in the letter.
You can check that there is letter with subject [PATCH 00/25]
. This letter contains a summary for other letter patches with subjects[PATCH 01/25]
[PATCH 02/25]
[PATCH 03/25]
...
Do not forget to edit the file [PATCH 00/25]
. Set the email subject and the email core
If you want to generate the patches with signed-off-by
just add -s
:
git format-patch -s --cover-letter -M master -o ../outgoing/
8) and then to send the letters with the git command:
git send-email --to=email.address@destination.com --cc=email.address2@destination.com --cc=email.address3@destination.com outgoing/*
To use git send-email
to send your patches , edit ~/.gitconfig to specify your account settings:
[sendemail] smtpencryption = tls smtpserver = smtp.gmail.com smtpuser = yourname@gmail.com smtpserverport = 587
- git send-email (multiple patches)
- git send-email
- git send-email
- 如何使用git send-email
- git+打patch+send-email
- Git send-email的配置
- 用git send-email发送patch
- [Linux] git send-email的使用
- send email
- send email
- Email--Send
- Send Email
- git send-mail发送patches配置(linux环境,使用Gmail)
- Configuring git send-email to use Gmail SMTP
- Fedora git send-email 使用 msmtp 发送 Gmail 邮件
- 在mac上配置git send-email使用gmail
- generate patches by git
- Send Email 发送邮件
- 内核裁剪笔记
- linux-3.2.36内核启动4-setup_arch中的内存初始化3(arm平台 bootmem_init源码分析)
- ffmpeg深入研究
- 《Oracle Applications DBA 基础》- 10 Custom Application Integration
- QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_connection', old connect
- git send-email (multiple patches)
- poj.2109
- unity3d协同
- 《Oracle Applications DBA 基础》 - 11 - 12 FNDCPASS ,FND_STATS 和 FNDLOAD
- 任意输入两个数,求出它们的和差积商
- 后缀数组模板
- windows下gdb单步调试
- 2014 百度前端二面
- SQL Server 2008 取得登录用户密码使用天数(转帖+亲自实践)