From the course: Robot Framework Test Automation: Jenkins CI and Git Version Control

Create a GitHub account

- [Instructor] Now that we have Git installed on our local computer, that is half the equation that we need for our source code management process. It's great that we can create multiple versions and branches on our local computer but really what we want to do is be able to share our work with a team of developers and also have some degree of redundancy and back up on a server that's not our local computer in case for some reason, our local computer crashes or is stolen or something like that. You definitely want to have your code on a remote server somewhere. You'll notice I have a project open here called Git demo and this project is not currently being managed by the Git version control system. What I could do is go straight into this VCS menu here and I could click Enable Version Control Integration. And notice it's telling me to select a version control system to associate with the project root. So it's talking about this project and I could click on this and say I want to manage it with Git and when I click on OK, then these files will be initialized into a Git repository. That's definitely one way you could do it. I'm not going to do it that way because like I mentioned, I do want a remote server where I can store my code. There are several different cloud-based GitHub repositories you can use but GitHub is by far the most popular. So I'm going to create a GitHub account and show you how I can put my automated scripts up there in GitHub and manage my versions either by myself or with other team members. So once I'm on GitHub.com, the first thing I need to do if I don't already have an account is click on Sign Up. So the first thing I do is type in a username and email address and my password and click on Create an Account. Now it's asking me what kind of a plan I want to choose. GitHub offers a free account which allows you to create as many public repositories as you want, that means anybody in the public can see your code. If you want to have any private repositories, you'll need to pay $7 a month. Bitbucket.com allows you to have a free account and create private repositories so I'll show you how to use that system as well in a different video. For now, I'll just use unlimited public repositories for free, click on Continue. And now I'm inside GitHub and you can see my account name is @bryanlamb. They've got an optional survey here you can fill out and I can either skip or submit that step and the first thing it asks me to do is to start a project. And of course, before I can contribute, I need to verify that my email address is real so I'll go do that. Actually, instead of bothering with that, I'm just going to go ahead and log out of this and sign into an existing account that I have which I've paid for so you can see the private repositories. So now we're inside a paid account and I have the ability to go to my profile and change my settings. If you're going to create your own GitHub account, go into the profile section is going to be a very important thing to do. You'll notice we've got this Edit Profile button here. And when I click on that, I can upload a new avatar picture, I've some account settings like changing my password, I can change my username or I can delete my account. I can add and remove email addresses to my account. I can change the way that I get email notifications from the website. I can update my billing information when I need to or downgrade back to a free account. I can create SSH keys that will allow me to be able to interact with my code without having to use my name and password. And there are a variety of other settings here you can explore on your own, including some API settings down here where you can interact with GitHub via API. I'm going to go ahead here and change my avatar here real quick just to show you how that works. So I selected a new photo from my local disk, I click on Set New Profile Picture. I can add my username that I want to show in public there, whether or not I want to display my email address, a little information about myself, and any company name or URL you want to add in. And down at the bottom here, notice that there is a checkbox that says that you're available for hire. So there's a good chance that maybe that allows other people to find you based on keywords and such. I haven't really explored this feature but posting some sample scripts in public repositories on GitHub is a great way to share your skills with potential employers but the most important thing that I would be able to do is to click on the plus sign here and either import a repository or create a new repository. Creating a new repository is easy. Click on that link, notice in this case, my GitHub ID is scorpionsw and I'll just type in demo for my repository name. Description is optional and since I'm paying, I can either have this be a public repository or a private repository. I'll make it private. You can initialize with a README and that allows you to add some details with markup that helps people understand what the purpose of this repository is. Now it's a matter of clicking on Create Repository. And now I've got my first GitHub repository. You can see the URL is scorpionsw/demo and now I would have the ability on my local computer to be able to clone or download this from the remote server to my local server. Obviously, there's no code in here so there's no value for me to do that but in a later video, I'll show you how you can clone an existing script repository if you're a new person on a team or something like that. So I do have the ability to create files or upload files. I can edit my README here using a variety of markup syntax so that the description down here looks really nice and there are a variety of tabs right here where I can see issues that are associated with this code base. Pull requests which I'll explain in a future video. A wiki about this code base. I can see graphs of usage and I can drop into settings here which allows me to change the name if I want to. I can add collaborators by searching for their git usernames. I can create branches and specify which ones are protected to disable forced pushing and such. And I can click on the Deployment keys link down at the bottom here. That will allow me to create some keys that I can use instead of using my username and password credentials if I don't want to expose those in a code base. Finally if I go back to Options here and scroll down towards the bottom, you can see I can delete this repository or transfer ownership to a different GitHub username. So that's the basics of how GitHub works. so now, let's take a look at how we can use PyCharm to create a repository here on GitHub and start managing our scripts.

Contents