git 如何从 Visual Studio 中删除/隐藏 GitExtensions 工具栏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13141780/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:41:46  来源:igfitidea点击:

How to remove/hide GitExtensions toolbar from Visual Studio?

gitwindows-8visual-studio-2012git-extensions

提问by david.s

I tried:

我试过:

  • right-click on a toolbar and uncheck GitExtensions
  • right-click on a toolbar > Customize and delete GitExtensions
  • moved the toolbar from the second row to the first row
  • searched GitExtensions settings for a way to disable/hide the toolbar, but didn't find anything
  • 右键单击工具栏并取消选中 GitExtensions
  • 右键单击工具栏 > 自定义并删除 GitExtensions
  • 将工具栏从第二行移动到第一行
  • 在 GitExtensions 设置中搜索禁用/隐藏工具栏的方法,但没有找到任何东西

The GitExtensions toolbar shows up again on the second toolbar row after a computer restart.

计算机重启后,GitExtensions 工具栏再次显示在第二行工具栏上。

I use:

我用:

  • Windows 8
  • Visual Studio 2012
  • Git 1.7.11
  • GitExtensions 2.41
  • 视窗 8
  • 视觉工作室 2012
  • git 1.7.11
  • GitExtensions 2.41

回答by milgner

The Git Extension files are stored in your 'My Documents' folder in a "Visual Studio 2012" subfolder. Removing these files will make the toolbar disappear from within MSVC.

Git 扩展文件存储在“Visual Studio 2012”子文件夹中的“我的文档”文件夹中。删除这些文件将使工具栏从 MSVC 中消失。

回答by KindDragon

  1. Run Git Extensions uninstaller from Control Panel
  2. Click to 'Change' button
  3. Deselect "Visual Studio extension" feature
  1. 从控制面板运行 Git 扩展卸载程序
  2. 点击“更改”按钮
  3. 取消选择“Visual Studio 扩展”功能

UPDATE

更新

This should work with 2.48.04 and newer versions: right-click on a toolbar, uncheck GitExtensions, close all VS instances and start it again.

这应该适用于 2.48.04 和更新版本:右键单击工具栏,取消选中 GitExtensions,关闭所有 VS 实例并重新启动它。

回答by Jason Enochs

Deleting or changing the settings files (C:\Users\UserName\Documents\Visual Studio 2012\Settings\CurrentSettings.vssettings) is only a temporary fix because Visual Studio recreates/overwrites this file each time you update a setting or close Visual Studio.

删除或更改设置文件 (C:\Users\UserName\Documents\Visual Studio 2012\Settings\CurrentSettings.vssettings) 只是临时修复,因为每次更新设置或关闭 Visual Studio 时,Visual Studio 都会重新创建/覆盖此文件。

Using a team settings file doesn't work either because that file won't overwrite a parameter that's not in listed in the CurrentSettings.vssettigs file. And it won't be listed in the CurrentSettings.vssettigs file after you close Visual Studio and the file gets regenerated.

使用团队设置文件也不起作用,因为该文件不会覆盖 CurrentSettings.vssettigs 文件中未列出的参数。在关闭 Visual Studio 并重新生成文件后,它不会列在 CurrentSettings.vssettigs 文件中。

* I see 3 options *

* 我看到 3 个选项*

1. Recompile GitExtensions with the modification noted here:https://github.com/gencer/gitextensions/commit/faef52e8191fde54ef9787f6f5156cf315ec9be5This is not easy because the project includes a bunch of third party libraries that have to be installed and configured. Good Luck!

1. 重新编译 GitExtensions 并在此处注明修改:https : //github.com/gencer/gitextensions/commit/faef52e8191fde54ef9787f6f5156cf315ec9be5这并不容易,因为该项目包含一堆必须安装和配置的第三方库。祝你好运!

2. Use this .dll that was fixed by someone else.http://mirror.nienbo.com/git-extensions/patch_for_244/GitPlugin.dllAfter you download it, right click on it, select properties, and press the "unblock" button. Then copy it to C:\Users\UserName\Documents\Visual Studio 2012\Addins (overwriting the current file). This worked great for me.

2. 使用别人修复的这个.dll。http://mirror.nienbo.com/git-extensions/patch_for_244/GitPlugin.dll下载后,右键单击它,选择属性,然后按“取消阻止”按钮。然后将其复制到 C:\Users\UserName\Documents\Visual Studio 2012\Addins(覆盖当前文件)。这对我很有用。

3. Use a different git extension program.

3. 使用不同的 git 扩展程序。

回答by Daniel

The location is correct, the file is called CurrentSettings.vssettings

位置正确,文件名为CurrentSettings.vssettings

I modified the line:

我修改了这一行:

<add_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" 
 Name="GitExtensions" MenuType="toolbar" />

by adding Visibility="hide" FullScreen="hide"

通过添加 Visibility="hide" FullScreen="hide"

Result:

结果:

<add_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" 
 Name="GitExtensions" MenuType="toolbar"
 Visibility="hide" FullScreen="hide"/>

回答by Sakis

Resetting all settings worked for me. Though, after that I had to set everything up from scratch.

重置所有设置对我有用。不过,在那之后我不得不从头开始设置一切

If that's not a problem then go to visual studio TOOLS> Import and Export Settings...> Reset all Settings.

如果这不是问题,则转到 Visual Studio工具>导入和导出设置...>重置所有设置

I think it takes effect after restarting visual studio.

我认为它在重新启动visual studio后生效。

回答by manwithoutsleep

The settings for the Visual Studio Git Extensions toolbar can be found in this file:

Visual Studio Git 扩展工具栏的设置可以在这个文件中找到:

\Users{username}\Documents\Visual Studio 2012\Settings\CurrentSettings.vssettings

\Users{用户名}\Documents\Visual Studio 2012\Settings\CurrentSettings.vssettings

Search the file for the term GitExtensions to find the toolbar setting lines. There will likely be two lines, not necessarily next to each other:

在文件中搜索术语 GitExtensions 以查找工具栏设置行。可能会有两行,不一定彼此相邻:

<add_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" Name="GitExtensions" MenuType="toolbar"/>

<add_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" Name="GitExtensions" MenuType="toolbar"/>

<modify_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" Name="GitExtensions" Visibility="show" FullScreen="hide" Dock="top" Row="2" FloatRectangle="0,0,208,24" DockRectangle="0,0,208,24"/>

<modify_toolbar Menu="{000D7B18-CDE4-49F0-B194-FE3E25BBF096}:00000002" Name="GitExtensions" Visibility="show" FullScreen="hide" Dock="top" Row="2" FloatRectangle="0,0,208,24" DockRectangle="0,0,208,24"/>

You'll want to modify the second of the two lines, since it will take precedence, and it already has the settings in it.

您需要修改两行中的第二行,因为它将优先,并且其中已经包含设置。

You can set the Visibility to "auto" to make it behave like other toolbars, or "hide" to just get rid of it. Set the Row to 1 if you want it to stick to the first row of toolbars.

您可以将可见性设置为“自动”以使其表现得像其他工具栏,或者“隐藏”以摆脱它。如果您希望它坚持第一行工具栏,请将 Row 设置为 1。

Of course you'll have to do this with VS closed in order for it to work properly.

当然,您必须在 VS 关闭的情况下执行此操作才能使其正常工作。

回答by Aman

Please make sure you remove .git hidden folderfrom your solution folder. or any other .git file

请确保从解决方案文件夹中删除 .git 隐藏文件夹。或任何其他 .git 文件