panaprime.blogg.se

Visual studio and github
Visual studio and github





visual studio and github visual studio and github

All the Git options on Team Explorer only worked after I initialized my project through the command line. Another answer stated that I just had to create a local repo in Team Explorer and then my changes would show up, but that didn't work either. Also nothing would show up in the Changes dialog either. I went to File->Add To Source Control, which was suppose to basically do the same as git init, but it didn't seem to initialize my project because when I would then go to Team Explorer all of the options were grayed out. I read all of the answers but none of them worked for me. That's how I was finally able to integrate Visual Studio to use my existing project with git. Then I selected that local git repository, went to Settings->Repository Settings, and added my Remote Repo. Then I went into Team Explorer and added a local git repository. On Visual Studio 2015 the only way I finally got it to work was to run git init from the root of my directory using the command line. Bear in mind this is Visual Studio 2013, so your mileage may vary. So either use a new repository or delete the old one that you had previously screwed up. Make sure it's empty or you'll have master branch conflicts and it won't let you. Then simply click Sync on the next screen and drop in the EMPTY GitHub repository URL. Give it a default commit name 'initial files' or whatever floats your boat and commit.

visual studio and github

This then commits all differences between your existing solution and the local repository, essentially updating it with all these new files. Now, this opens an empty LOCAL repository and the trick which nobody ever tells you about is to ignore the Team Explorer completely and go to the Solution Explorer, right click the solution and click Commit. There are some explanations of that above, and everybody gets this far. In order to take an existing project without source control and put it to an existing EMPTY (this is important) GitHub repository, the process is simple, but tricky, because your first inclination is to use the Team Explorer, which is wrong and is why you're having problems.įirst, add it to source control. After slogging around Visual Studio I finally figured out the answer that took far longer than it should have.







Visual studio and github