Git: Difference between revisions

From Wiki RB4
Line 8: Line 8:
* '''Modified''' means that you have changed the file but have not committed it to your database yet.  
* '''Modified''' means that you have changed the file but have not committed it to your database yet.  
* '''Staged''' means that you have marked a modified file in its current version to go into your next commit snapshot.
* '''Staged''' means that you have marked a modified file in its current version to go into your next commit snapshot.
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 cloning a repository from another computer.

Revision as of 21:46, 26 November 2016

Concepts

Git is a Distributed Version Control Systems (DVCS). Clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.

For Git a version history is a stream of snapshots of the complete project. Therefore the local repository contains the complete history of a project.

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

  • Committed means that the data is safely stored in your local database.
  • Modified means that you have changed the file but have not committed it to your database yet.
  • Staged means that you have marked a modified file in its current version to go into your next commit snapshot.

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 cloning a repository from another computer.