From the course: Git Essential Training

Set up a remote repository

- With our device completely ready, let's push our first code. In this section, we are going to create a remote repository so that we have something to practice with when we use Git. For a remote repository, we use a Git provider. This is a web service in the cloud where you can store a Git repository like you would do locally. Because it's in the cloud, you can use it as a source to pull code to other computers. There are a few different providers that you can use like GitHub or GitLab or Bitbucket. The good thing is that although interfaces might be a bit different, they all use the same concepts, so if you know how one of them works, you know how to use the other ones. For this example, we are going to use GitHub. If you don't have an account yet, you can go to github.com. If you see in the upper right corner, there is a link where you can sign up. It's completely free to do so, you just need an email address. Once your account is ready, you have the option in the web interface to create a new repository. Once we click that, we have a few options to fill in. First, we need to decide on the repository name, this will be part of the URL, so it's best to not use spaces. For this, I will just call it git-repo, which is short for repository. I can add a description if I want to, and I can choose if I want this repository to be public or private. If it's public, it's available to everyone. It doesn't mean that people can commit code to it, but they will be able to see all your code. In this case, I'm going to create a private one, so I'm the only one who can see and commit to this repository. Here I can choose if I want to initialize the repository. I can add a Read Me file, I can get a gitignore, and I can choose a license if I want to. I'm just going to add a Read Me file because it's best practice to have that in every repository. We're not going to set the other files at this moment, but once you get a hang of it, I do encourage you to check what they are and why you could choose them. We'll click Create Repository, and within a few seconds our repository is ready.

Contents