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 initInitialized 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 to manage our repository:
[4] ~/grocery (master)$ lltotal 8drwxr-xr-x 1 san 1049089 0 Aug 17 11:11 ./drwxr-xr-x 1 san 1049089 0 Aug 17 11:11 ../drwxr-xr-x 1 san 1049089 0 Aug 17 11:11 .git/
So, we can move this grocery
folder wherever we want, and no data will be...