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


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 (fetch)
origin (push)

the .git/config file contains

	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url =
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

Thanks for any suggestions!!!

@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