首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在本地合并时更改` `git merge --squash`默认模板?

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

Stack Overflow用户
提问于 2020-02-13 12:51:37
回答 1查看 43关注 0票数 3

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

代码语言:javascript
复制
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

但我想要的是:

代码语言:javascript
复制
Squashed commit of the following:
 *  Added algorithms for Cosine-similarity
 *  Set stage for similar objects
 *  Fixed a bug in space world automation

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

EN

回答 1

Stack Overflow用户

发布于 2020-08-30 14:24:35

我也想知道这个问题的正确解决方案。作为一种棘手的解决方法,您可以搜索以下正则表达式并将其替换为*

代码语言:javascript
复制
\ncommit \w+\nAuthor:.*\nDate:.*\n\n\s+
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60200679

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档