Hello everyone,
I am Batool Fatima. I am 18 years old. I have been learning DevOps for a month now. This is my second code blog. In last blog, I wrote what I learnt about DevOps Intro and Version Control Systems. Today, Let's learn Git with me.
Git is a powerful and famous distributed version control system which is used for tracking changes in source code during software development.
Let's first learn about some terms of Git-
Repository- It is a place in git where you have all your codes or kind of folders on server.
Server- It stores all the repositories and metadata(commit Id, Tags etc).
Commit- It is point in git where we save the changes done in the code.
Branch- Branching means diverging from the main branch to work in isolation so that you do not disturb the main code. The primary or default branch is called Master branch.
Push- This copies the changes from a local repository instances to a central repository. This is used to store the changes permanently into the git repository.
Pull- This operation copies the changes from a remote repository to a local machine. The pull operation is used for synchronization between two repositories.
Commit Id- Whenever you commit any change, you get a unique commit Id. Its is of 40 alpha-numeric characters. The smallest change in the code when committed again will change the commit Id. Its reference to identify the change and by whom it is done.
Advantages of Git-
Free and Open Source.
Fast as most of the operations are performed locally.
Enables collaboration of different developers without interfering in each other's work.
Provides backup of all the versions of code at any time.
Thank You!