Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Git Essentials

You're reading from   Git Essentials Create, merge, and distribute code with Git, the most powerful and flexible versioning system available

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781785287909
Length 168 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ferdinando Santacroce Ferdinando Santacroce
Author Profile Icon Ferdinando Santacroce
Ferdinando Santacroce
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image