Skip to content

Instantly share code, notes, and snippets.

@danieldogeanu
Created March 19, 2023 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieldogeanu/b257b15d3f81818ecd7a189b81acb4f1 to your computer and use it in GitHub Desktop.
Save danieldogeanu/b257b15d3f81818ecd7a189b81acb4f1 to your computer and use it in GitHub Desktop.
How to change Git remote origin urls, to push repo to GitLab or GitHub.

How to change Git remote origin URLs, to push all branches and tags from your repo to GitLab or GitHub.

With the commands below, you can change your source control provider easily:

git remote set-url origin git@gitlab.com:your-repo-name.git
git remote -v
git push -u origin --all
git push -u origin --tags

Don't forget to change your-repo-name!

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