Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

move a git project from one Visual Studio Online account to a different Visual Studio online account

I am using GIT on Visual Studio Online for my source control. I want to move a project from my personal VSO account to my business VSO account. E.g. existing project from account1.visualstudio.com to account2.visualstudio.com

I am using VS2013. Any idea how to do this? Thanks

like image 591
JdeC Avatar asked Oct 03 '14 14:10

JdeC


2 Answers

  1. On your business VSO account create a new, empty repository.
  2. Add the address of the new repository as a remote to your local git repository (git remote add)
  3. git push to the new remote you added in step 2, using your business VSO account's credentials
  4. Have a celebratory drink for being so awesome.

If you want to push all branches from the origin remote to your new remote (and not just the commits under your current branch) you'll need to use something like git push newRemote refs/remotes/origin/*:refs/heads/*. You might also want to consider pushing tags as well, if you've been using them.

like image 73
Richard Banks Avatar answered Nov 14 '22 22:11

Richard Banks


If you're just moving source code, that's really easy. Just create the new VSO project, and then add your local repository to it.

Follow the steps here: http://www.alexandervanwynsberghe.be/moving-existing-git-repository-tfservicetfs-2013/

like image 20
Andrew Clear Avatar answered Nov 14 '22 22:11

Andrew Clear