0

Our project code repository is in Gitlab and want to move to Github. Do we have any tools to migrate complete history,branches and commits?

Appreciate your help. Thank you.

2 Answers2

1

If you only want to migrate history (branches and commits) and not any wiki or tickets, it's pretty straightforward:

  • Clone the original repository
  • Push it to the new location
git clone --mirror your_old_repository local_directory
cd local_directory
git push --mirror your_new_repository
knittl
  • 246,190
  • 53
  • 318
  • 364
1

The best tool to migrate branches from one repo to another comes preinstalled with git. It's called git. You need to add a new remote to your local repo and push the branches to the new remote instead of the old one (origin?). So:

git remote add gh https://www.github.com/blahblahblah.git
git fetch gh # just in case
git push gh master develop staging v1.2.4

That way you pushed 3 branches and one tag into the brand new gh repo, no real need to go fancy.

If you later decided that gh is your new origin, then it's a matter of renaming remotes, a different question altogether (even to the point to sneack the change behind git's back by changing the url straight into .git/config ;-)).

eftshift0
  • 26,375
  • 3
  • 36
  • 60