O'Reilly logo

Ubuntu Server Cookbook by Uday R. Sawant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing file revisions with Git commit

We have initialized a new repository for our project. Now we will learn how to store file modifications using git add and git commit.

Getting ready

Make sure you have initialized a new git repository and created sample files under your project directory. Follow the previous recipes to get more details.

How to do it…

Now that we have a new repo initialized for our project, let's go ahead and check in our files.

  1. Before we add any files, simply check the current status of the repo with the git status command. This should list all the files under the Untracked files list, as follows:
    $ git status
    
    How to do it…

    As shown by git status ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required