简体   繁体   English

Visual Studio 2017-当我“向源代码管理中添加解决方案”时如何禁用自动提交

[英]Visual Studio 2017 - How to Disable Auto Commit When I “Add Solution to Source Control”

With Visual Studio 2013 I didn't have this problem. 使用Visual Studio 2013,我没有这个问题。

When I add my solution to Git Source Control (Right click -> Add Solution to Source Control) it automatically commits my project. 当我将解决方案添加到Git Source Control时(右键单击->将解决方案添加到Source Control),它将自动提交我的项目。

I don't want to do that because I want to set my own first commit message. 我不想这样做,因为我想设置自己的第一条提交消息。 I want to set "First Commit" (for example) instead of "Add Project Files" which is the default message from VS2017. 我想设置“首次提交”(例如),而不是“添加项目文件”(这是VS2017的默认消息)。

How can I disable auto commit? 如何禁用自动提交?

Rather than look into change how VS works, why not try to actually solve the problem you have. 与其尝试改变VS的工作方式,不如不尝试实际解决您遇到的问题。 I can see at least two easy solutions that involve absolutely no VS behavior changes: 我可以看到至少两个简单的解决方案,这些解决方案绝对不涉及VS行为更改:

  • create the git repo manually, git init , git add , git commit , so you're in absolute control over what happens 手动创建git repo, git initgit addgit commit ,因此您可以完全控制发生的事情
  • Let VS create the repo, and then git commit --amend to change the message to your desired one. 让VS创建存储库,然后git commit --amend将消息更改为所需的消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 添加解决方案到源控件对VS 2017中的Git没有任何作用 - Add solution to source control does nothing for Git in VS 2017 Visual Studio 2019 - 在解决方案资源管理器中查找不在源代码管理中的项目 - Visual Studio 2019 - Find items not in source control in Solution Explorer 如何在Visual Studio 2017解决方案中设置文件夹以在其中搜索DLL? - How to set folder in a visual studio 2017 solution for searching DLLs there? 如何在Visual Studio 2017中调试.NET 4.6框架源代码? - How do I debug .NET 4.6 framework source code in Visual Studio 2017? 在Visual Studio 2017中使用Windows Silverlight开发的解决方案? - Solution for developing in Windows Silverlight in Visual Studio 2017? 整个解决方案搜索在 Visual Studio 2017 中不起作用 - Entire Solution Search is not working in Visual Studio 2017 为什么Visual Studio 2017会发布整个解决方案? - Why Visual studio 2017 is publishing entire solution? 我无法在Visual Studio 2017中添加引用 - I can't add reference in Visual Studio 2017 Visual Studio 2017中的临时禁用依赖项验证 - Temporary disable dependency validation in Visual Studio 2017 如何在Visual Studio 2017中将Windows控件添加到C ++桌面应用程序中? - How can I add windows controls to a C++ desktop application in Visual Studio 2017?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM