Git

Sharing the Code with the Team Using Version Control Systems

Overview

Git is a distributed version control system that is used to version control files, documents, or text-based files in general. It also maintains the edit history of the code and other related content. There are different types of version control systems, but the explanation here will be limited to Git, the most common in recent years.

Using Git allows a developer to see what code has been edited when, by who, and the entire history of any work in relation to changes in the code. Because of this, when problems occur, developers are able to do things like fix code or revert it back to its previous state.

Git's code management consists of a remote repository; a cloud or central server that stores code, and a local repository; code that's stored in the computer of the developer. Git has a feature known as Branches that allows multiple developers to work on the same source code at the same time. A branch is a line of development that's independent from the source code, letting developers "branch out" and isolate their work from the main code.

The following scenario takes a look at how development takes place using branches.
First, a developer creates a new branch to work from on their own computer by their local repository. After they finish working on the code, they commit and share this branch with the remote repository. Then to finish, the developer can submit a pull request for merging, where the branch can be merged to integrate with the main, or other branches on the remote repository.

When merging sometimes a problem known as a conflict can occur when the same line of code is edited by different branches, but Git has many tools to help developers successfully navigate these issues and merge properly.

Git

Learning Objectives

A large majority use Git because of the strong benefits that come with version control system, the least of which aren't limited to high efficiency in developing, rapid bug fixes and coding edits, and minimal code conflicts between developers. Skill with Git can be considered an absolute must because if a developer isn't able to use Git on a project that does, they won't be able to contribute to development.

Ability with Git, and the practicality that skills with it bring are extremely applicable to team development, as new members are able to look at the history of past codes from the change logs, along with staying aware of and following the work of other developers.

Using version control services like GitHub gives developers even further ability like easily performing code review, among other features.

Learning how to use Git can help keep team-based development moving smoothly and efficiently.

Learn from Here

Here you will learn the minimal basics of how to use Git. To start, while getting accustomed to how Git works try to get a hold of local and remote repositories and visualize how they are used.

  • Using Git

    Share Files

    Get a Hold on Edit History

  • Using GitHub

    Set up Git

    Create a GitHub Account

    Create a Remote Repository

    Push Code into a Remote Repository

Recommended Materials

  1. Git Study I | Progate

  2. Git Local Environment Setup (Windows)

Share what you learn today!