from github

I have just created this empty repo: https://github.com/castorfou/data-scientist-skills

from existing local repo connected to gitlab

Add the new remote url to github, name it github

(base) guillaume@LL11LPC0PQARQ:~/git/data-scientist-skills$ git remote add github https://github.com/castorfou/data-scientist-skills.git

Or this is possible to use ssh protocol: git remote add origin git@github.com:castorfou/data-scientist-skills.git

Push repo to this new remote url: git push -u github

(base) guillaume@LL11LPC0PQARQ:~/git/data-scientist-skills$ git push -u github
Username for 'https://github.com': castorfou
Password for 'https://castorfou@github.com':
Counting objects: 4736, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3171/3171), done.
Writing objects: 100% (4736/4736), 630.97 MiB | 9.08 MiB/s, done.
Total 4736 (delta 1549), reused 4538 (delta 1458)
remote: Resolving deltas: 100% (1549/1549), done.
To https://github.com/castorfou/data-scientist-skills.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'github'.

for new local repo

Clone the new repo: git clone git@github.com:castorfou/data-scientist-skills.git

And I want to have same names for same remotes: git remote rename origin github

So now it is quite easy to update from different remote repo:

cat refresh_from_github.sh 
#!/bin/bash
git fetch github
git pull