Getting started with GIT

Daniela S. Alzate
2 min readMay 18, 2021

WHAT IS GIT?

Git is an open source DVC, when we refer to open source this imply that it’s available freely over the internet. A Distributed Version Control System also known by its acronym DVC or DVCS is a software that integrates all the changes from multiple and simultaneous work, keeping all the development history centralized.

It was created by Linus Torvalds in 2005 as a way to save and integrate all the work from different developers around the world meanwhile the Linux Kernel was developed. Using and management Git is very simple. It takes only a few seconds to merge changes, create or clone repositories. Git have a lot advantages like it’s easy to learn and use, no need of powerful hardware, it’s free among others…

But one of the biggest advantages of using Git is its distribution model. This means that the chances of losing data are very rare because there are multiple copies of data on any client side mirrors that’s why is a Light Service beacuse the heavy lifting happens on the client side, so the server hardware can be very simple indeed.

BASIC CONCEPTS

1. Repository

It contains the collection of files and their different versions.There are two types of repositories:

1.1. Local Repository

This is a full copy of the server repository created by using the git clone command, where users can perform many operations such as add, remove, rename and move files, commit changes and many more. After users make their changes in their Local Repository they use the git commit command to these changes become a part of the service repository.

1.2. Server Repository

It contains the files that are imported from the local repository and it is the starting point for further users who wants to make changes such as updating and deleting files or adding new features in the repository.

1.3. Commit

It is a snapshot of the local repository at a specific point in time.

1.4. Clone

Clone operation creates the local repository making a full copy of the server repository.

1.5. Pull

Pull operation copies the changes from the server repository to the local one, allowing the synchronization between the two repositories

1.6. Push

Push operation copies changes from a local repository to the server one. This is used to store the changes permanently into the server repository.

Git Workflow

2. HEAD

HEAD is a pointer, which always points to the latest commit in the branch. Whenever you make a commit, HEAD is updated with the latest commit.

3. Branches

Branches are used to create another line of development. By default, Git has a main or master branch. Usually, a branch is created to work on a new feature. Once the feature is completed, it is merged back with the master branch and we delete the branch.

--

--