Checking changes into a Git repository

Once you have worked on your code, you'll want to check your changes into your local repository. This is the first step in propagating your change further, as you need to update your local copy of the repository before you can push the changes for other users to view.

This recipe will tell you how to commit changes to your local Git repository.

Getting ready

For this recipe, you need either a Red Hat- or Debian-based Linux host.

How to do it…

Let's make changes into our local Git repository:

  1. Change the directory into the one you want to use for your project.
  2. Add any new files to the git staging area:
    git add .
    

    Tip

    This will add new files to the working folder (including folders and contents) to your commit. You can ...

Get Learning DevOps: Continuously Deliver Better Software 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.