Git and GitHub : A beginners guide

What is Git?

Git is a free and open-source version control system designed to handle everything from small to very large projects with speed and efficiency. It is built for tracking changes in the source code and enables multiple developers to work collaboratively on non-linear project development.

Why should you use Git?

When working on real-life software projects contributions by multiple developers are done in parallel. This might create code conflicts leading to the crashing of the software product being developed. Also, changes may be needed to be pushed to the project according to market needs which might sometimes create a need to revert back to the previous version of the project. All this can be efficiently handled by the version control system Git.

Git has a remote repository which is stored in a server and a local repository which is stored in the computer of each developer. The repository can be defined as a file containing records of all the changes committed to the project.

Click here to download Git 😍


GitHub

GitHub is a cloud-based Git repository hosting service that facilitates social coding by providing multiple tools for code collaboration and management. It provides us with a platform to push all the changes committed on a local repository (repository on our computer) to a cloud-based remote repository. It also allows the world to contribute to our codebase using various Git features.

Click here to open your GitHub account😍

Important terms used by GitHub developers:-

  1. Commit

    A commit is an individual change to a file or set of files. A unique ID is created when each commit is saved that lets collaborators keep a record of their work. A commit can be thought of as a snapshot of a repository.

  2. Clone

    As the name suggests it is used to download a copy of a repository on our machine.

  3. Push

    A programmer sends code from a local repository to the online repository.

  4. Branch

    It is an independent line of development for the project file.

  5. Fork

    A fork is a repository that has been copied from one member's account to our account. Forks and branches let a developer make modifications without affecting the original code.

  6. Pull request

    If a developer would like to share their modifications, they can send a pull request to the owner of the original repository.

  7. Merge

    If after reviewing the modifications, the original owner would like to pull the modifications into the repository, they can accept the modifications and merge them with the original repository.


Stay tuned for the next blog on Basic commands to use Git and GitHub.✨