0

For some reasons, we used to migrate our project from github to gitlab about half a year ago. However, we find a lot of backwards of gitlab during the half year and now wanna move back to github.

The problem is an old version of the same project still kept on github, and most of the tutorials I found are based on creating a new repo on github. Is there any way to utilize the migration and need not to create a new repo?

1
  • git push --mirror? Never used it, but seems to do what you want. Or maybe you just want to keep the current heads, and use git push --all.
    – JB Nizet
    Commented Aug 15, 2015 at 15:40

1 Answer 1

1

If you have a git repo already, you can just change the origin to github and push directly there.

git remote rename origin gitlab # Keep the old reference to gitlab
git remote add origin GITHUB_REPO_URL
git push --tags origin master # (and other branches too)

Then, you can just work right off of github again.

Not the answer you're looking for? Browse other questions tagged or ask your own question.