GIT & GIT Repository- How it Works

images (1)
The purpose of GIT is to manage a project or a set of files, as they change over time. Git store this information in a data structure called a Repository. A GIT repository contains among other things.

  1.  A set of “ commit ” object  
  2.  A set of references to commit object, call heads.

Commit Changes

‘Commit’ operation is used to apply changes from the working copy to the repository. This operation modifies the repository and other developers can see these changes by updating their working copy.

Before commit, one has to add files/directories to the pending change-list. This is the place where changes wait to be committed. With commit, we usually provide a log message to explain why someone made changes. This log message becomes a part of the history of the repository.  Continue reading