Book Image

Git Essentials

By : Ferdinando Santacroce
Book Image

Git Essentials

By: Ferdinando Santacroce

Overview of this book

Table of Contents (17 chapters)

Repository structure and file status life cycle

The first thing to understand while working with Git is how it manages files and folders within the repository. This is the time to analyze a default repository structure.

The working directory

In Chapter 1, Getting Started with Git, we created an empty folder and initialized a new repository using the git init command (in C:\Repos\MyFirstRepo). Starting from now, we will call this folder the working directory. A folder that contains an initialized Git repository is a working directory. You can move the working directory around your file system without losing or corrupting your repository.

Within the working directory, you also learned that there is a .git directory. Let's call it the git directory from now on. In the git directory there are files and folders that compose our repository. Thanks to this, we can track the file status, configure the repository, and so on.

File statuses

In Chapter 1, Getting Started with Git, we used two different...