Saturday, 1 December 2012

GIT - Stages

Git has THREE main states
  1. Committed [Git Directory] - Most Important part of GIT
  2. Modified [Working Directory]
  3. Staged [Current Version]
Committed - The data is safely stored in our local database.
Modified - We have changed the file but have not committed it to our database.
Staged - We have marked all modified files in its current version. That represents we will use the version in our next commit.



Git Directory is the location where GIT stores the metadata and object database of our project. It is the directory which we will be copied when we clone a repository.

Working Directory 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 us to use or modify.

Staging Area is a simple file, generally contained in our Git directory, that stores information about what will be going in our next commit.

The Basic Git workflow:
  1. We will modify files in our working directory. 
  2. We will stage the files, adding snapshots of them to your staging area.
  3. We will commit the staged files and store them permanently into our Git Directory.

Reference Link: http://www.kernel.org/pub/software/scm/git/docs/

    1 comment:

    1. I just came across from this article and I read it. It is too good and worth reading. And now I would like to say that thanks for sharing with me such nice article. Deciding upon a content management system is highly important long-term I advocate Drupal. Because Seeing that the leading nonprofits use Durpal, I picked Drupal For hosting I run Pantheon with features like automated back-up retention.. What Content Management System do you like?
      Drupal for Education

      ReplyDelete

    Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.