gpt4 book ai didi

git - 如何在本地 merge 时更改 `git merge --squash` 默认模板?

转载 作者:行者123 更新时间:2023-12-05 07:13:19 24 4
gpt4 key购买 nike

当我运行 git merge --squash test_branch 时,它显示:

Squashed commit of the following:

commit ac72a4308ba70cc42aace47509a5e
Author: quyen <q@me.com>
Date: Tue Jun 11 10:23:07 2019 +0500

Added algorithms for Cosine-similarity

commit 77df2a40e53136c7a2d58fd847372
Author: quyen <q@me.com>
Date: Tue Jun 11 13:02:14 2019 -0700

Set stage for similar objects

commit 249cf9392da197573a17c8426c282
Author: quyen <q@me.com>
Date: Thu Jun 13 16:44:12 2019 -0700

Fixed a bug in space world automation

但我想要的是:

Squashed commit of the following:
* Added algorithms for Cosine-similarity
* Set stage for similar objects
* Fixed a bug in space world automation

我该怎么办?我不想为提交添加一些细节,只有提交名称就足够了。

最佳答案

我也想知道正确的解决方案。作为 hacky 解决方法,您可以搜索以下正则表达式并将其替换为 * :

\ncommit \w+\nAuthor:.*\nDate:.*\n\n\s+

关于git - 如何在本地 merge 时更改 `git merge --squash` 默认模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60200679/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com