Programming

Visual Studio 2013에서 Git 통합을 영구적으로 비활성화하려면 어떻게해야합니까?

procodes 2020. 8. 9. 17:41
반응형

Visual Studio 2013에서 Git 통합을 영구적으로 비활성화하려면 어떻게해야합니까?


도구 / 옵션 대화 상자를 사용하여 git 통합을 비활성화 할 수 있다는 것을 알고 있지만이 설정이 세션간에 유지되지 않는 것 같습니다. 즉, 솔루션을 닫았다가 다시 여는 즉시 Git 통합이 다시 활성화됩니다. Visual Studio가 내 솔루션 파일 시스템 트리에서 .git 폴더를보고 있다고 생각합니다.

Git 플러그인을 사용할 때 잘못 작동하는 다양한 Visual Studio 2013 플러그인이 있습니다. 저는 명령 줄에서 소스 제어를 관리하는 것을 선호하며 Git 통합으로 인해 눈에 띄는 속도 저하가 발생하는 몇 가지 매우 큰 프로젝트에서 작업합니다. 솔루션을 열고 작업 할 때 단순히 사용하지 않거나 필요하지 않기 때문에 영원히 끄고 싶습니다. 이게 가능해?


말했듯이 소스 제어 플러그인을 비활성화 할 수 있습니다.

  • 도구 / 옵션
  • "모든 설정 표시"를 선택하십시오.
  • 소스 제어 / 플러그인 선택
  • "현재 소스 제어 플러그인"을 "없음"으로 설정합니다.

그런 다음 Ade Miller가 말했듯이 Visual Studio를 다시 시작하십시오.

내 Visual Studio는 git 플러깅이 활성화 되었기 때문에 매우 느리게 작동했고이 단계에 따라 "세션간에 지속적으로"비활성화 할 수있었습니다.

도움이 되었기를 바랍니다.


NoGit 확장을 설치할 수없는 Visual Studio 2015에서도 동일한 문제가 발생했습니다. "시작시 마지막 솔루션 열기"옵션을 사용하므로 이것이 문제와 관련이 있다고 생각했습니다.

그래서 "도구-옵션-소스 제어"로 이동하기 전에 솔루션을 닫은 다음 전원을 끄고 VS를 다시 시작하고-짜잔, SC는 꺼진 상태로 유지되었습니다! 다른 솔루션에서도 계속되기를 바랍니다.


나를 위해 다음 명령으로 저장소를 생성하면 문제가 해결됩니다.

git init --separate-git-dir _git

.git 디렉토리를 생성하지 않기 때문에 실제 저장소 디렉토리를 가리키는 .git 파일 만 있습니다. 예 :

gitdir: C:/tfs/ProjectName/Main/_git

Visual Studio (적어도 내가 사용하는 VS2015 업데이트 3까지)는 인식하지 못합니다!

Git Extensions (내가 사용하고있는)가이를 지원하는 데 문제가 있었지만 폴더를 .git가리키는 파일을 _git완벽하게 처리했기 때문에 이것은 환경 변수보다 더 잘 작동했습니다 .


IDE가로드 될 때마다 VS2015에서 git SCC가 다시 활성화되는 한 가지 이유는 CodeLens입니다. 도구 / 옵션 / 텍스트 편집기 / 모든 언어 / CodeLens TFVS 및 Git과 관련된 다양한 활동에 대한 확인란이 있습니다. 이러한 git 확인란을 선택하면 git repo에서 작업하고 있다고 판단되는 경우 Git 플러그인이 자동으로 활성화됩니다.


NoGit Visual Studio 확장 은이 동작을 처리합니다.

보너스 : 멋진 설명.


Visual Studio 2015의 경우 CodeLens가 다시 시작한 후 Git 소스 제어 플러그인을 다시 활성화하는 것을 발견했습니다. CodeLens를 비활성화하면이 문제가 해결되었습니다.


(업데이트 :이 답변은 이제 GIT_DIR 및 GIT_WORK_TREE에 대한 더 깊은 이해를 기반으로 완벽하게 작동하는 솔루션을 제공합니다)

요약 : Git은 .gittfs에서 체크 아웃 한 파일을 사용하여 디렉토리를 작업 디렉토리 외부의 위치 로 이동할 수있을만큼 유연 합니다. 이를 통해 Visual Studio가 감지 할 수있는 git의 흔적없이 git 저장소로 작동하는 동안에도 100 % 깨끗한 tfs 체크 아웃을 수행 할 수 있습니다. 핵심은 git dir (git 저장소 저장소)과 작업 트리 (체크 아웃 한 소스 코드)를 분리하는 것입니다.

소스 코드가 체크 아웃되었고 c:\work\someproject\tfscode이미 git init거기에서 실행했다고 가정합니다 . 예를 들어 Visual Studio가 c:\work\someproject\tfscode\.git디렉토리를 감지하여 문제를 일으 킵니다.

삶을 더 풍족하게 만들려면 다음을 수행하십시오.

$ cd /cygdrive/c/work/someproject
$ mv tfscode/.git tfscode.git
$ echo export GIT_DIR=/cygdrive/c/work/someproject/tfscode.git >> env.sh
$ echo export GIT_WORK_TREE=/cygdrive/c/work/someproject/tfscode >> env.sh
$ source env.sh
$ cd tfscode
$ git status
...
$

이것은 비주얼 스튜디오와 관련하여 완벽하게 작동합니다. 왜냐하면 git에 저장된 모든 것을 완전히 무시하기 때문입니다.


Visual Studio 2015에서 Microsoft GitProvider 제거

링크 : http://researchaholic.com/2015/02/02/remove-the-microsoft-gitprovider-from-visual-studio-2013/

  1. Visual Studio가 닫혀 있는지 확인
  2. regedit 열기
  3. HKEY_CURRENT_USER \ Software \ Microsoft \ VisualStudio \ 14.0_Config \ SourceControlProviders로 이동합니다.
  4. 11b8e6d7-c08b-4385-b321-321078cdd1f8 삭제 세부 정보 창에 GitProvider라고 표시되어야합니다.
  5. Visual Studio 열기

이것은 Visual Studio 2013 및 2015에서 저에게 효과적이었습니다. Visual Studio를 닫았다가 다시 열어도 지속됩니다.

  1. 솔루션 열기

  2. 도구-> 옵션-> 소스 제어-> 플러그인을 없음으로 설정

  3. Visual Studio를 닫고 관리자 권한으로 아래 명령을 실행합니다.

move "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Git.Provider.dll" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Git.Provider.dll.bak"

I managed to disable the built-in Visual Studio Git Provider by deleting all occurrences of those registry keys:

7FE30A77-37F9-4CF2-83DD-96B207028E1B

11b8e6d7-c08b-4385-b321-321078cdd1f8


Use new NoGit extension package: https://github.com/markrendle/nogit/releases/download/1.0.5/NoGit.vsix

Download and add to visual studio: https://superuser.com/questions/73675/how-do-i-install-a-vsix-file-in-visual-studio

Easy.


You need to close all VS solutions. start one, set Menu\tools\options\Source Control\Git-->None, close this solution when prompted. Now, when opening any other solution, the options stays "None".


VS2015 was sucking up 50% of my CPU when idle. I learned that disabling Git was the solution. Unfortunately disabling Git only to learn it automatically re-enables it.

In my case I actually wanted to use Git but not with 50% cpu usage.

As NoGit solution is only available for VS2013, you can instead download: Git Source Control Provider even if you don't use Git. My CPU usage is now 2,2% instead of 50% when idle.


I had a hard time finding a solution for this, and made it after so many attempts, so I can't be precise. Create another local repository using GitHub Desktop in another folder. Done this, open Visual Studio without loading a project, now Team Explorer should show up both repositories. Select the new repository as you should do some operations, at this pont you can "remove" your old repository, since the new one is the "active" one. After doing this, I removed the .hidden .git* files from the former folder. Now opening the project does not cause the old repository to be re-created again. Hope this helps.


That's crazy but what worked for me was to Empty my Recycle Bin (which contained the unwanted .git folder of my solution).

I still can't believe it...


Rename "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation"

VS will show error only once and work fine.


This git extension hell slows up everything in IDE (VS 2015 in my case). I had to remove the entire TeamFoundation folder to get rid of this. The downside is that you will not be able to use Git and TeamFoundation in Visual Studio 2015. Note: Backup this folder elsewhere and restore it when needed.

To delete the folder i did this. The steps i followed to delete the right folder

The reason i did this is because , VS 2015 generates random folder name for the TeamFoundation extension, so my folder name could be different than yours.


It was pain on back for a week and I didn't know how did I start this source control service in VS2015. But got to know how to stop it. Here is the steps to decouple git/any source control with VS2019.

Go to VS-->Tools-->Options-->Source Control-->[Current Source Control Plug-in]

You get all the possible source control in your system and None option. If you choose None you are all set. Mine got fixed just after selecting None option , hit ok and restart the VS and no more source control.


Tools, Options, Source Control, Plug-in Selection, None


1) close solution and visual studio. 2) go to solution's directory and delete hidden git directory and 2 git text files. 3) open visual studio again. 4) goto tools -> options and source control. 5) select none. 6) restart visual studio. 7) open your solution. 8) goto tools -> options and source control again and select TFS. 9) in solution right click to select add source control to solution. 10) select tfs.


Set Tools\Options\Source Control back to TFS. Close Visual Studio 2015. Open the root folder of your source code. Delete folder named ".git". Restart.

참고URL : https://stackoverflow.com/questions/21150060/how-can-you-disable-git-integration-in-visual-studio-2013-permanently

반응형