All About the CLI and Version Control

Sunday, October 25, 2015

Have you ever heard of the CLI or version control? Well, if you’re interested in becoming a programmer it’s important to understand how to use the CLI and how version control works.

The CLI

The command line interface or CLI is an application that you type and execute text commands to perform specific tasks. Learning how to use the CLI will help teach you about how your computer organizations information in a file system and how your computer’s operating system works. As a result, this will help you to be more fast and efficient in your work.

Version Control

So, what is version control and why does it matter? Version control is a system the helps you manage your work by storing information on all the versions of your work by taking “snapshot”. Each “snapshot” is the act of telling the version control system that you’re ready to save your changes and are referred to as commits. These commits are stored in a special folder called a repository that gives you access to each commit. This helps to prevent you from having to start a project over or fix a bug in your code because it allows you to restore an earlier version of your work or navigate to a specific version.

Centralized vs. Distributed Version Control Systems

There are several version control systems to choose from and they are usually divided into the category of “centralized” and “distributed”. Centralized version control systems have only one repository that’s usually stored remotely on a network server. If you want to make changes and add commits it has to be done over a network connection to the central repository. Distributed version control systems don’t rely on one central repository and you can interact with the repository by cloning it onto your computer. This creates a local copy of the repo that you can make changes to without a network connection and the original repository is affected by the clone.

Git and GitHub

One popular distributed version control system is Git. Git is a fast and efficient piece of software that lives locally on your computer to help you manage your projects. Many programmers that use Git also use GitHub to work on projects and collaborate but don’t confuse the two. GitHub is website that hosts repositories remotely and uses Git as its version control system. In case something happens to your local repository it’s important to have a copy remotely as well. GitHub is a great way to store your code, manage projects, and connect you with other people in the industry to collaborate on projects.