Skip to content

Instantly share code, notes, and snippets.

@raihankhan
Last active September 29, 2025 10:25
Show Gist options
  • Select an option

  • Save raihankhan/40df4def2171731a53cdff24d98a67ec to your computer and use it in GitHub Desktop.

Select an option

Save raihankhan/40df4def2171731a53cdff24d98a67ec to your computer and use it in GitHub Desktop.
Fork a Github Repo 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:
```bash
git remote add upstream https://github.com/user/repo
```
3. Fetch the original Github repository changes
```bash
git pull upstream master
```
4. Start developing and pushing to your own Gitlab repository
```bash
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