I'm having trouble with Visual Studio 2017 (Community Edition), trying to publish my new solution to Visual Studio Online.
Visual Studio will not let me Push the solution before I commit changes. However, when I go to Changes in Team Explorer, Visual Studio is trying to commit my entire C:\Users\Username folder and all of it's sub-directories (34,967 Changes) as in the screenshot below:

I have been trying for hours now, have even tried uninstalling and re-installing Visual Studio but I can't figure out how to fix this problem.
Could somebody please explain how to simply publish the solution that I'm working on to Visual Studio Online?
I think you have initialized the git repository in the user folder instead of the project folder.
To fix that, delete the '.git' folder that is located in the user folder (it could be hidden by default).
Then initialize the git repository in the good folder.
It’s not necessary to locate your local repo to C:\Users\Username\Source\Repos\reponame (it's default path but you can change it when cloning a repo). You just need to make sure VS is connect with the right git repo for you are working.
Steps as below to trouble shooting your issue:
Please make sure you have cloned your VSO git repo. And the default local repo is cloned into C:\Users\Username\Source\Repos\reponame. But you can change the path in your need.

Check the local git repo you are working for.
VS -> Team Explorer -> Manage connections -> the bold repo is which you connect now (such as C:\Users\TFSTest\Source\Repos\Git2is the current working local repo).

Create solution for the right path
You can create solutions from Team explorer - New (the location is the current local repo path C:\Users\Username\Source\Repos\reponame by default) or you can create by File - New - project (the default locations is like c:\users\Username\documents\visual studio 2017\Projects). No matter how you create a solution, you must make sure the Location is your local repo path (C:\Users\Username\Source\Repos\reponame) and the Create new Git repository is unselected.

Now VS will only show the changes for the new solution you created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With