Book Image

Extending Puppet

By : Alessandro Franceschi
Book Image

Extending Puppet

By: Alessandro Franceschi

Overview of this book

Table of Contents (21 chapters)
Extending Puppet
About the Author
About the Reviewers

Git workflows

If we want to work and prosper with Git, we have to grasp its principles. There are theories and some alternatives on how we can manage our Puppet code with Git in a safe and comfortable way.

In this section, we will review:

  • Git's basic principles and commands

  • Some useful Git hooks

  • Two different workflows for Puppet code management with Git

Git's basic principles and commands

Git is generally available as a native package in every modern OS. Once we have installed it, we can configure our name and e-mail (that will appear in all our commits) with the following:

git config --global "Alessandro Franceschi"
git config --global [email protected]

These commands simply create the relevant entries in the ~/.gitconfig file. We can add more configurations by either editing this file directly or with the git config command.

To create a Git repository, we just have to move to the directory that we want to track and simply type git init. This command initializes a repository and...