October 2016
Beginner
861 pages
20h 37m
English
We have seen the different objects in Git but how do we create them? In this example, we'll see how to create a blob, tree, and commit object in the repository. We'll learn about the three stages of creating a commit.
We'll use the same data-model repository as seen in the last recipe:
$ git clone https://github.com/dvaske/data-model.git $ cd data-model
First, we'll make a small change to the file and check git status:
$ echo "Another line" >> another-file.txt $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)