Git objects

In Chapter 1, Getting Started with Git, we created an empty folder (in C:\Repos\MyFirstRepo) and then we initialized a new Git repository, using the git init command.

Let's create a new repository to refresh our memory and then start learning a little bit more about Git.

In this example, we use Git to track our shopping list before going to the grocery; so, create a new grocery folder, and then initialize a new Git repository:

[1] ~
$ mkdir grocery

[2] ~
$ cd grocery/

[3] ~/grocery
$ git init
Initialized empty Git repository in C:/Users/san/Google Drive/Packt/PortableGit/home/grocery/.git/

As we have already seen before, the result of the git init command is the creation of a .git folder, where Git stores all the files it needs ...

Get Git Essentials - Second Edition 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.