在man page for git cherry-pick中
...
-x
When recording the commit, append a line that says "(cherry picked
from commit …)" to the original commit message in order to indicate
which commit this change was cherry-picked from. ...
-r
It used to be that the command defaulted to do -x described above,
and -r was to disable it. Now the default is not to do -x so this
option is a no-op.
...是否有配置设置在本地将默认值重新设置为-x,并允许-r禁用它?我找不到,但我可能错过了。
发布于 2012-06-26 04:10:12
除非为git cherry-pick -x创建别名,否则这是不可能的。
(有趣的事实:在提交abd6970中更改了默认值。)
发布于 2021-12-09 17:33:32
通过运行以下命令将此别名添加到~/.gitconfig:
git config --global --replace-all alias.pick "cherry-pick -x"然后,您可以简单地运行:
git pick abc123您可以将"pick“选项替换为对您有意义的任何单词。
https://stackoverflow.com/questions/11158359
复制相似问题