git remote -v
git remote set-url origin --add <remote_url>
Change YOUR_PROJECT/.git/config
file like this:
From this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:YOUR_USERNAME/YOUR_PROJECT.git ## git pull command will pull from this repo from GitHub
url = git@gitlab.com:YOUR_USERNAME/YOUR_PROJECT.git
url = git@bitbucket.org:YOUR_USERNAME/YOUR_PROJECT.git
To this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@gitlab.com:YOUR_USERNAME/YOUR_PROJECT.git ## git pull command will pull from this repo from gitlab
url = git@github.com:YOUR_USERNAME/YOUR_PROJECT.git
url = git@bitbucket.org:YOUR_USERNAME/YOUR_PROJECT.git
Change YOUR_PROJECT/.git/config
file like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:YOUR_USERNAME/YOUR_PROJECT.git
url = git@bitbucket.org:YOUR_USERNAME/YOUR_PROJECT.git
url = git@gitlab.com:YOUR_USERNAME/YOUR_PROJECT.git
[remote "github"]
url = git@github.com:YOUR_USERNAME/YOUR_PROJECT.git
fetch = +refs/heads/*:refs/remotes/github/*
[remote "bitbucket"]
url = git@bitbucket.org:YOUR_USERNAME/YOUR_PROJECT.git
fetch = +refs/heads/*:refs/remotes/bitbucket/*
[remote "gitlab"]
url = git@gitlab.com:YOUR_USERNAME/YOUR_PROJECT.git
fetch = +refs/heads/*:refs/remotes/gitlab/*
## Pull from GitHub
git pull github master
## Pull from GitLab
git pull gitlab master
## Pull from BitBucket
git pull bitbucket master