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
- Your project directory
cd Project/
- Check the remote origin values, which are GitHub URLs.
git remote -v
- Fetch all of the remote branches and tags:
git fetch origin
- Update remote URL from GitHub to GitLab
git remote set-url origin git@gitlab.com:krishna-commits/Project.git
- Push all to the origin, i.e. GitLab URL
git push origin --all
- 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