Cloning your repository and pushing code to it

In this recipe, we will take a look at cloning your repository from GitLab to your local machine. When you use Git Bash on Windows, the commands will be the same.

Getting ready

You need to create a new repository in your GitLab instance. In this example, we will use the repository named super-git.

How to do it…

In the following steps, we will set up our repository and push code to it:

  1. Go to the newly created repository.
  2. Select the URL in the top-right section.
    How to do it…
  3. Go to the folder where you want to check out the project in the terminal. No need to create a new folder for the project.
  4. Enter the Git clone command, ...

Get GitLab Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.