Migrate Code from GitHub to GitLab


Migrate Code from GitHub to GitLab

For this, I am using “Project” as an example, directory or repository names vary depending on the one you are using

  1. Your project directory
cd Project/
  1. Check the remote origin values, which are GitHub URLs.
git remote -v
  1. Fetch all of the remote branches and tags:
git fetch origin
  1. Update remote URL from GitHub to GitLab
git remote set-url origin git@gitlab.com:krishna-commits/Project.git
  1. Push all to the origin, i.e. GitLab URL
git push origin --all
  1. Final checks
git remote -v git branch -a

Video Resources (GitLab GUI to import project is now working)
https://www.youtube.com/watch?v=RviEqHe-Fzk


Follow me on : Medium Linkedin Researchgate

© Krishna Neupane Since @ 1995. All rights reserved.