I have looked through many web pages on the new Git integration in VS 2013 and they do not deal with adding an existing solution to Github. In fact I can't find much on using GitHub instead of Visual Studio Online.
Can anyone tell me how I start from an existing solution and add it to Github using the tools in VS 2013.
Right click the solution name in Solution Explorer. Select "Add to Source Control". Then head over to SourceTree, and select Clone/New. Select Add Working Folder and point to the new Git place you just made inside your solution.
OK this worked for me.
That creates a local GIT repository
That creates an empty repository with no Master branch
Your solution is now in GitHub
There is a lot easier way to do this that doesn't even require you to do anything outside Visual Studio.
That's all. Visual Studio github plugin automatically created repository for you and configured everything. Now just click on Home and choose "Changes" tab and finally commit your first commit.
This question has already been answered accurately by Richard210363.
However, I would like to point out that there is another way to do this, and to warn that this alternate approach should be avoided, as it causes problems.
As R0MANARMY stated in a comment to the original question, it is possible to create a repo from the existing solution folder using the git command line or even Git Gui. However, when you do this it adds all the files below that folder to the repo, including build output (bin/ obj/ folders) user options files (.suo, .csproj.user) and numerous other files that may be in your solution folder but that you don't want to include in your repo. One unwanted side effect of this is that after building locally, the build output will show up in your "changes" list.
When you add using "Select File | Add to Source Control" in Visual Studio, it intelligently includes the correct project and solution files, and leaves the other ones out. Also it automatically creates a .gitignore file that helps prevent these unwanted files from being added to the repo in the future.
If you have already created a repo that includes these unwanted files and then add the .gitignore file at a later time, the unwanted files will still remain part of the repo and will need to be removed manually... it's probably easier to delete the repo and start over again by creating the repo the correct way.
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