重写Git存储库的历史记录时,如何删除签名(由git commit -s
or 创建git commit --signoff
)?
git filter-branch
的commit-filter
似乎只支持使用的变量git commit-tree
:
GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL
GIT_AUTHOR_DATE
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE
EMAIL
Run Code Online (Sandbox Code Playgroud)
Bri*_*ell 13
Sign offs are just part of the message body. So, you'll want to use git filter-branch --msg-filter
to run a command to find lines starting with Signed-off-by:
and remove them.
Something like
git filter-branch --msg-filter "sed /^Signed-off-by:/d"
Run Code Online (Sandbox Code Playgroud)
should do the trick.
归档时间: |
|
查看次数: |
2952 次 |
最近记录: |