Visual Studio中的默认Git提交消息 [英] Default Git Commit Messages in Visual Studio

查看:98
本文介绍了Visual Studio中的默认Git提交消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在解决由合并提交触发的CI构建定义问题.我想找到Visual Studio在其中存储默认合并提交消息的位置,然后对其进行编辑以包含 *** NO_CI *** hack.到目前为止,我还没有找到关于默认提交消息值存储位置的任何引用.我在IDE中浏览了设置,没有任何看起来像提交消息的东西.有人知道他们隐藏在哪里吗?

I'm looking to solve a problem with our CI build definition being triggered by merge commits. I'd like to find where Visual Studio stores the default merge commit message and edit it to include the ***NO_CI*** hack. So far I haven't found any reference to where the default commit message values are stored. I dug through the settings in the IDE and there aren't any that look like commit messages. Does anyone know where they're hidden?

此外,我已经在Stack上看到了相关问题,但是大多数人都在谈论cygwin和命令行git的用法,而不是VS中集成的Team Explorer面板.

Also, I've seen the related questions here on Stack but most are talking about cygwin and command line git usage, not the integrated Team Explorer panel in VS.

推荐答案

这是一种解决方法

This is a workaround

您可以运行bash或PowerShell来检查最后一次提交是否包含某个单词.(我在这里使用bash)

You can run bash or a PowerShell to check if the last commit contains a certain word. (I'm using bash here)

git log head -1 | grep -q 'Merge:'

将其作为管道的一部分运行,设置一个变量,该变量可用于验证条件的一部分.

Run it as a part of the pipeline, set a variable which can be used to validate as a part of a condition.

git log head -1 | grep -q 'Merge:' && _stop_pipeline=true

为阶段或步骤使用条件:

Use a condition for the stage or the step:

这篇关于Visual Studio中的默认Git提交消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆