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 Git project

In this recipe, we will take a look at creating your first Git project on your local machine. If you're a Windows user, please make sure that you use Git Bash. This way, you can use the same commands as the ones Linux and OS X users use.

We're going to create a project called super-git.

How to do it…

To create our first Git project, perform the following steps:

  1. Open your terminal and browse to the folder where you want to create your project.
  2. Create a folder named super-git and create the following directory inside it:
    $ mkdir super-git
    $ cd super-git
    
  3. To make this folder a Git project, we need to tell Git to monitor this folder. We do this by typing the following command:
    $ git init
    

    The following screenshot shows you the output for this command:

    How to do it…
  4. Let's create one file to add to the repository. We name it README.md:
    $ echo "HELLO README" > README.md	
    
  5. Now, we will add this new file to Git. This is also known as staging the files:
    $ git...
You have been reading a chapter from
Gitlab Cookbook
Published in: Dec 2014
Publisher:
ISBN-13: 9781783986842
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