Moving a project from Bitbucket to Github

Both Bitbucket and Github are excellent choices to store your code; this isn’t a post about which one is best. Instead, the goal of this post is to document the steps I followed to move one of my projects from Bitbucket to Github, and what I did to wire up Github to Azure to automate the deployments of said project.

When I first started working in this project, I needed to use a cloud-based repository as a backup and to have it accessible from any computer at any time. I’ve been using Bitbucket’s free private repositories for a while now, and most of my projects are still there.

About Bitbucket

“Bitbucket is more than just Git code management. Bitbucket gives teams one place to plan projects, collaborate on code, test, and deploy.”

The text below is the description from bitbucket’s website. It is, in fact, a complete solution for code management. Just like Github, it does offer an easy-to-use interface and workflows to make building and deployment of your code a breeze.

However, one of Bitbucket’s advantages until recently was the unlimited free private repositories. For individuals with many projects like myself, paying for an external repository for each software experiment I create it’s just not feasible. Bitbucket understood this from the start, and this is the reason many developers, and probably small companies use their free private repositories.

About Github

“GitHub is a development platform inspired by the way you work. From open source to business, you can host and review code, manage projects, and build software alongside 31 million developers.”

The paragraph above is from Github’s website. While Github became very popular among the open source community, it just wasn’t a feasible solution for individuals or small companies looking to use private repositories and without resources to pay for them, at least not until now. You see, Microsoft acquired Github on October 2018 and this, perhaps, allowed them to expand their offerings and offer free private repositories. Regardless of the reason, it was a great move by Github, and I’m sure some people have switched to Github from other places now that they are offering free private repositories.

How do you move your code to a different remote repository?

Moving your code from one cloud repository to another is in fact, very simple if you are only moving a self-contained application like the one I moved. Technically, you don’t move your existing repository; you change the settings in your local repository to point to a new remote repository. For example, my project’s source lives in my laptop, under a folder labeled c:\repos\iai and since this folder is already set up as a Git repository, all I had to do is execute the following Git command:

 git remote set-URL origin https://github.com/ricardodsanchez/iai.git 

The command above allowed me to change the URL from one remote Git repository to another one, instead of removing and re-adding.

IF my code weren’t set up with a remote Git repository yet, I would have needed to use the following command to add the new remote Git repository:

git remote add origin https://github.com/ricardodsanchez/iai.git
git push -u origin master

That’s all, after you execute the command above, your local repository will be connected to the new Github remote repository.

Setting continuous deployment in Azure with new Github repository

Fortunately, this was also very easy, and Azure enables you to set up your application with continuous deployment by connecting to one of the following source control options:

  • Azure Repos
  • Github
  • Bitbucket
  • Local Git

Since I had already connected my web application with Bitbucket in Azure’s deployment center, all I had to do was disconnect it from Bitbucket, and then connect it to Github. To do this, you have to log in to the Azure portal, click on the App Services you want to change, and then go to Deployment Center under Deployment. Once you are there, you disconnect any existing repositories and then go through the steps to connect a new one.

After re-connecting my application to a new remote repository (Github), continuous deployment was again active and set up to automatically run every time I merge any code to the project’s Master branch in Github.

Below is a screen shot of the log after finishing the move and merging new changes to my project:

Screenshot for Azure app services continuous deployment

If you try browsing to the Github URL shown in the screenshot above you’ll get a 404 (Page Not Found) error, this is because this is a private repository.

The application for which code I moved from Bitbucket to Github is called Interns and Internships, and while it isn’t 100% complete yet, you can visit it here:

https://internsandinternships.com/

Happy Coding!

A Saturday on Stevens Pass

It’s been two weeks since it last snowed (surprisingly) in Seattle and my family and I were already missing it. Truth is that snow days aren’t a common thing within Seattle city limits, but if you drive a little outside of the city limits then you’ll find plenty of powder. My wife, Felly and I are not strangers to snow having lived in Minnesota for about ten years. This past weekend, we finally got ourselves in the car and drove to Stevens Pass, which is an excellent place for winter sports such as snowboarding and skiing.

Stevens Pass is about 80 miles east from downtown Seattle, so it took us about one hour and a half to get there. It is beautiful, Stevens Pass that is. While the day was a bit cloudy, it was still a very scenic place, we weren’t prepared to go snowboarding or skiing yet, but we’ll be coming back soon to do that.

Our next visit to Stevens Pass will be less photos and more snowboarding or skiing, and we’ll be visiting all of the other mountains soon as well. So much stuff to do out there!

A note about impostor syndrome

Impostor syndrome is when a person doubts their accomplishments, feels that they don’t deserve it, or think that their achievements (a promotion, a raise, etc.) are the result of luck. The impostor syndrome can affect anyone, especially women and minorities who fear they owe their accomplishments to affirmative action.

What if we do the following when the impostor syndrome surround us?

What if we pretended we didn’t feel it?

What if we acted as though we were more confident and more competent?

What if we showed appreciation for what we’ve accomplished and behaved as we thoroughly deserved it?

What if we told our friends and family how happy we are about our accomplishments and how the result was expected due to all of our hard work and persistence?

It takes a lot of work to do this, it takes a lot of effort, more so than any of us is able to cope with.

But what if we did it every time the impostor syndrome shows up?

It’s possible that after doing the above for a while and acting as if we deserve our accomplishments, perhaps we would teach ourselves to take what we deserve and see the outcome we have always hoped for.

 

A snowy day in Seattle.

Last month, my family and I moved to Seattle, Washington after living in Austin, Texas for thirteen years.

Moving to Seattle was something my wife and I have been talking about for years, and last year we finally decided to sell our home in Austin and move to Seattle. One of the main reasons for the move was the milder weather in Seattle, and also the beautiful nature of Washington.

Well, it has snowed twice in Seattle since we moved in last month, and everyone tells us that this is very uncommon for the area. We don’t mind, at least not yet. My wife and I are fortunate to work from home, so we don’t have to deal with the traffic or icy roads out there.

Today, my kids and I decided to go explore and play on the snow at Denny Park in downtown. It was beautiful, the snow-covered trees and people playing with their dogs and kids just made it even more special. Here are some photos of our snowy Seattle day.