Creating a Git repo

It's very easy to create a Git repo. Follow these steps:

  1. Make a directory to hold your versioned files using the following commands:
    cd
    mkdir puppet
    
  2. Now run the following commands to turn the directory into a Git repo:
    cd puppet
    git init
    Initialized empty Git repository in /home/ubuntu/puppet/.git/

Making your first commit

You can change the files in your repo as much as you like, but Git will not know about the changes until you make what's called a commit. You can think of a commit as being like a snapshot of the repo at a particular moment, but it also stores information about what changed in the repo since the previous commit. Commits are stored forever, so you will always be able to roll back the repo to the state it was ...

Get Puppet 5 Beginner's Guide - Third Edition 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.