gpt4 book ai didi

git - git 何时在 merge 提交消息中包含存储库 URL?

转载 作者:太空狗 更新时间:2023-10-29 14:17:07 24 4
gpt4 key购买 nike

我注意到,我的团队成员的 merge 提交消息看起来会因提交者的不同而有所不同。

有谁知道:git 什么时候建议 merge 第一种形式的提交消息(即明确说明 repo url),什么时候使用第二种形式?

2017-07-05 11:34 Employee 1            M─│─┐ Merge branch 'wip-feature-1' of ssh://repo.company.com:1850/ttt/software into mainbranch
2017-07-05 10:45 Employee 2 │ │ M─┐ Merge branch 'wip-feature-2' into mainbranch

谢谢!

最佳答案

我认为他们正在使用 git pull 进行 merge 。我也可以在获取后用 git merge FETCH_HEAD 得到这个(这是有道理的,因为 git-pull 被记录为与 git merge FETCH_HEAD).

git merge 使用除 FETCH_HEAD 以外的任何参数(或没有参数)不会产生此消息,它使用“远程跟踪分支”或仅使用“分支” ' 而不是。

关于git - git 何时在 merge 提交消息中包含存储库 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46227079/

24 4 0
文章推荐: git - 用不同的远程分支替换 git 存储库中的所有现有文件,除了 .gitignore 中的文件
文章推荐: javascript - 调用 ajax 或放置静态 JSON 时,下拉列表未显示在我的 HTML 表中
文章推荐: javascript - 水平滚动时隐藏绝对定位的
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com