Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

Creating your first merge request

When you're done editing code, you might want your peers to review it. Instead of mailing patches around, you can do this in a super easy way in GitLab using a merge request.

A merge request is like an issue, but it has the diff of the code change attached to it, and users can create line-by-line comments on the code.

Getting ready

To follow this recipe, you need a project in GitLab, and you need that project cloned to your local system so that you can edit some code. I'll be using the super-git project we created in a previous chapter.

How to do it…

Perform the following steps to create a merge request:

  1. Go to the project on your local machine:
    cd ~/Development/super-git/
    
  2. Make sure you're on the master branch:
    git checkout master
    
  3. Before we make any changes to the code, we want to create a new feature branch:
    git checkout -b awesome-feature
    
  4. Let's make a change to the README.md file:
    echo "Change" >> README.md
    
  5. Now, we will...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime