What Is Version Control?

Understanding Version Control

When coding, you need to manage several files which are dependent on one another. If you want to save different versions, you need to save entire sets of files in different directories with version names. This approach is very computer resource-consuming. Git provides solutions for this with simple Git commands.

There are two keywords to understand the Git coding history management: Repository and Commit.

Repository

A repository is a location where different versions of codes are stored. There are two types of repositories:

  • Local Repository: it is installed on your local computer
  • Remote Repository: it is usually created under a web platform such as GitHub on the Internet.

Commit

Commit creates a snapshot to record the status of coding in a repository. Only committed files are recorded in the Git log system. Committed files are saved with the following key information:

  • Commit hash: Unique number to identify each commit
  • Author information: Name and email address of the person who made the commit
  • Date and time: Timing of each commit
  • Commit message: Short title and description about the commit