I needed to show a customer how to migrate from Azure DevOps to GitHub recently, and to smooth this process, we needed to repoint the origin remote.
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. You can see all posts on Git as well.
Changing the Remote
When you want to see remotes, you run this code:
git remote –v
As you can see, I have my origin pointed to Azure DevOps..
Now, I can delete and add back the origin remote if I want, but there is an easier way. I’ll use the set-url parameter with this code:
git remote set-url origin https://github.com/way0utwest/DatabaseDevOpsMS.git
This points the origin to my new remote in GitHub. Once I run this, I’ll set the branch and push, as the GitHub repo is empty. This pushes everything to GitHub and voila, I’ve got code there.
You can see this online
SQL New Blogger
I had to write this up in more detail for a customer as documentation. You might do this at work for someone, but I grabbed this focused, small piece of this and created my own blog, reusing a few screenshots.
Note: Don’t reuse screenshots of company assets. Recreate this in your own space.
This took me only about 5 minutes to write up after the other work was done. You could easily do that.