git cherry-pick -x default

孤街浪徒 提交于 2019-12-06 19:09:26

问题


In the 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.

...

Is there a config setting to locally set the default back to -x, and allow -r to disable it? I couldn't find one, but I may have missed it.


回答1:


Short of making an alias for git cherry-pick -x, no, this is not possible.

(Fun fact: The default was changed in commit abd6970.)



来源:https://stackoverflow.com/questions/11158359/git-cherry-pick-x-default

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!