Quidest?

Git states

· Lorenzo Drumond

Git has three main states that your files can reside in: modified, staged, and committed:

This leads us to the three main sections of a Git project: the working tree, the staging area, and the Git directory.

The working tree is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.

The staging area is a file, generally contained in your Git directory, that stores information about what will go into your next commit. Its technical name in Git parlance is the “index”, but the phrase “staging area” works just as well.

The Git directory is where Git stores the metadata and object database for your project. This is the most important part of Git, and it is what is copied when you clone a repository from another computer.

A file can be in one of several states in a Git repository. Here are a few important ones:

The git status command shows you the current state of your repo. It will tell you which files are untracked, staged, and committed.

References

Next -> git-workflow

#working_tree #computer_science #boot_dev #programming #states #github #git_directory #git #primeagen #index