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

Referencing issues

You have created an issue in GitLab and are about to commit the code that solves a specific problem. You want to be able to reference that specific issue from your commit message, or even better, close that issue once the commit has been merged! In this recipe, we will take a look at the possibility of referencing issues and merge requests from your commits.

How to do it…

In the following steps, we will see how referencing works:

  1. Log in to GitLab.
  2. Go to the super-git project.
  3. Create an issue in that project.
  4. To reference the issue in our commit messages, we must know the issue number. You can find it in the issue overview.
    How to do it…
  5. Now, create a commit that will close this issue. To do this, go to the cloned project on our local machine.
  6. Before we make the actual change, make sure that your local repository is up to date:
    git checkout master && git pull
    
  7. Now, create a feature branch in which we make this change:
    git checkout -b bug-fix
    
  8. Make the change that will fix this nasty...
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 €18.99/month. Cancel anytime