Chapter 2. Explaining Git

In this chapter, we will cover the following recipes:

  • Generating your SSH key on Unix-like systems
  • Generating your SSH key on Windows
  • Adding your SSH key to GitLab
  • Creating your first Git project
  • Cloning your repository and pushing code to it
  • Working with branches
  • Performing a rebase
  • Squashing your commits

Introduction

Before you can use GitLab, you need to know a little about Git itself, what Git is, and what pushing code is. As Git is a very complex system and is worthy of a book of its own, I'm just going to cover the basics. You'll learn how to get your SSH key and how to push your first code to GitLab.

Git is in the heart of GitLab. Without it, there would be no GitLab. It is a super powerful source control system, and has ...

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.