A quick rundown of what we've learned in this chapter.
Version control is very useful for tracking changes to any source code, including Puppet manifests. It's especially important when several people are working on the same code, so that they can communicate with one another about their changes. Version control can also detect and alert you to conflicts when the same file is edited by different people independently.
To use the Git version control tool, you create a repo using git init
and make an initial snapshot using git add
and git commit
. Thereafter, every time you want to record a set of changes, use git add
and git commit
again to store them with an appropriate message.
As you're working on a set of changes, you can see how the current code differs from Git's stored version using git diff
. The git status
command will show you which files Git thinks may need to be committed.
You can see the complete history of changes to your repo using...