I have a repository that is on Github and I want to move it to Codeplex.
I want to take all of the existing commits from my Github repo and push them to a new Codeplex repo.
I don't think this is the right approach, but I tried:
git remote github add url
git remote update
git add .
git commit
But there is nothing to commit, it downloads the github repo, but the working directory is empty.
How do I switch to the Github master branch, add all of the files to the Codeplex master branch, and push the commits to Codeplex?
Ideally moving forward I would like to be able to continue working on the Github branch and push changes to Codeplex.
Assuming you've already set up your Codeplex repository, and that GitHub is currently marked as origin, then you can do something like this.
git remote add codeplex https://foo/bar/baz
git push codeplex master
To review your remotes, use git remote -v
and you'll see what remotes you've defined, as well as the URLs they point to. You can work with multiple remotes; just make sure you've got both GitHub and Codeplex correctly set up as remotes. You can then push/pull from GitHub as you normally do, and then explicitly push to Codeplex whenever you want.