I started working on some code locally and used Git (Git Gui and command-line) to manage it. Now I was asked to include the project in TFS "on the corporate". I can access TFS remotely using a VPN connection.
The code for VS is one solution with several projects. I successfully added a solution for TFS using VS, and he seemed to find all the projects and add his .csproj files and all the code to the TFS source code.
Later, when it is not connected to TFS (VPN disconnected), I made a simple change and transferred it to the local Git repository. I had nothing but disappointment trying (to connect to the VPN and) trying to commit the change to TFS.
I am running Visual Studio. On the tab "Team Explorer - Home" there is "Home | Offline". I check Tools / Options / Source Control and TFS is the current version control provider.
I click the plug icon in the Team Explorer toolbar; it remembers the connection and now shows "Connect | Offline"; Below is a line with the link "Select project projects ..." and two sections with triangular triangles next to each other. One has a TFS server name (followed by (1)); under this name (only) "team project", where it is stored in TFS. In another section there is "Local Git Repositories (1)" and the name of the solution is displayed with the path to the solution directory next to it. The title of the "Team Explorer - Connect" tab. I double-click the name of the team project, and the title of the tab changes to "Team Explorer - Home" and the screen displays "Home | {teamProjName}" and two sections. One of them has a “Project” with a “Web Portal” and the usual sections “Pending Changes”, “Source Control Unit”, etc. Below; and another "Solutions" section, which has the line "Workspace: {workspaceName} | New ... |" Open ... "; below this is the only solution file. I double-click the name of the solution, and now" Home | solutionName (Local) ", in the" Solutions "section there is now" Branch: master "(Git certificate), and Tools / Options / Source Control says that it has been changed to the Microsoft Git provider. If I return it back to TFS, says : "Home | Offline, "and I have to click the plug icon again, and I will go back to where I started, except that it says:" Connect | {solutionName} (Local) "
Opening a solution at first does not help; when I connect to TFS, the solution closes. Closing and opening VS simply begins with the fact that “VS knows about TFS, but you are offline” and opening a solution with active TFS allows you to switch to the Git provider in (local) mode.
I am very close to executing registry hackers to disable Microsoft Git Provider - I did my Git work using Git Gui and the command line; VS is not involved.
I've gone crazy? I would think that “developing locally using Git, connecting to TFS to synchronize with others” is the main use case for VS.
Any help would be greatly appreciated. Thanks.