Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move from visual studio online to github

I've created a project with visual studio online source control, however I've never actually synced with the server, i'm just committing locally.

Now I need to add this project to a github repository, so in the windows github client I've located the project and added it, I can see all of my previous commits, however when I try to sync i'm presented with a dialogue box asking for my VS online credentials.

Does anyone know how I can remove the VS Online account and move the Project to Github?

Cheers!

like image 856
Johnny Grimes Avatar asked May 29 '15 01:05

Johnny Grimes


1 Answers

It looks like Visual Studio uses git for version control, which is consistent with the github client seeing your version history and greatly simplifies things: all you need to do is change the remote reference to point to your github repository.

Github actually has pretty good instructions for changing your remote here. To summarize the important bits, from the command prompt run:

cd <root directory of your local repository>
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
git fetch

Replace USERNAME and REPOSITORY with appropriate values, and running the fetch should prompt you for your github credentials to confirm it worked.

like image 155
1337joe Avatar answered Sep 30 '22 01:09

1337joe