我正在运行 a--tree-filter
以便将几个带有历史记录的目录移动到另一个存储库。我想在提交消息中附加一行,例如
(Imported from ProjectA rev 684fa3....)
Run Code Online (Sandbox Code Playgroud)
包括原始项目中相应提交的 SHA。
我怎样才能做到这一点?
git filter-branch --msg-filter 'cat; echo rewritten from $GIT_COMMIT' master
Run Code Online (Sandbox Code Playgroud)