Last week I started a small project in Visual Studio 2017. Got it to the point where I want to check it into source control and share it with my co-workers. The problem is that somehow (man, I wish I knew how so that I could avoid doing this again) it got checked into Git on my machine. It isn't going to do anybody any good being checked into Git on my machine. And we've standardized on TFS. I've tried removing the .gitignore and .gitattributes files from the root folder of my VS 2017 project, but that didn't work. (Besides, the instant I got back into the project in VS 2017, those 2 files were recreated.)
So, how do I get the solution and project out of Git so that I can get it into TFS/TFVC?
The problem is that somehow [...] it got checked into Git on my machine.
That is probably the best thing that has happened to you! Follow the Microsoft example and standardise on git...
But, anyway,... Find the '.git' folder which is at the root directory (and that could be hidden), delete it and check your project in TFVC.
To get the solution out of git:
To add the solution to TFS/TFVC source control:
TFS supports Git too, so you could push it to a git repository in TFS:
I deleted all the .git files from the solution directory and still had issues...
Git kept defaulting to the source control even after restarting and setting source control to visual studio.
Fix: I then noticed that I wasn't signed into TFS!
After I signed into TFS in Team Explorer GIT stopped defaulting when I tried to add the solution to source control. I was able to add to TFS.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.