Skip to content

Instantly share code, notes, and snippets.

@adriaPerez
Last active February 17, 2025 13:17
Show Gist options
  • Save adriaPerez/fe72a975cf3c1f9aa2aff7ce47fa4d3b to your computer and use it in GitHub Desktop.
Save adriaPerez/fe72a975cf3c1f9aa2aff7ce47fa4d3b to your computer and use it in GitHub Desktop.
Forking Git repository from GitHub to GitLab

https://stackoverflow.com/questions/50973048/forking-git-repository-from-github-to-gitlab

  1. Create an empty repository in Gitlab

  2. Set the original Github repository as upstream:

    git remote add upstream https://github.com/user/repo
  3. Fetch the original Github repository changes

    git pull upstream master
  4. Start developing and pushing to your own Gitlab repository

    git push origin master
  5. You can configure Gitlab's repository mirroring settings to automate the pushing/pulling from the original Github repository (upstream)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment