After migrating to gitlab from github, how to adapt origin URL

Hi!

After hearing about the Microsoft taking over github, I migrated all my repos to gitlab. I am sure many people are doing the same.

I run git from the Linux command line.

Now I need to set my local repos to point to the gitlab version. But I am at a loss as to how to do that.

Or is it just a matter of replacing “github” by “gitlab” in the following?

For example, if I look at my CameraBox repo:

$ git remote -v
origin git@github.com:gratefulfrog/CameraBox.git (fetch)
origin git@github.com:gratefulfrog/CameraBox.git (push)

the .git/config file contains

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = git@github.com:gratefulfrog/CameraBox.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

Thanks for any suggestions!!!
Cheers,
Bob

@gratefulfrog if you have the same username, then yes :slight_smile: It’s a matter of changing one word.

@axil Thanks! It’s done!

1 Like