git chapter-1

Git From Scratch- by chirag kumar

Git: Version Control System

you have made a product and you continuously moving forward to release and scale it. so, at any point in time, when you have to revert or downgrade update or maintain it . ... we need a version control system.

Git

types of Git

  1. Local Version control

  2. Centralized Version control

Set up git with GitHub into your local system

login your GitHub into command prompt into your local system

git config --global user.name "abcchirag"

git config --global user.email "helpichirag@gmail.com"

git init

Working Directory -> Staging Area -> Commit History

  1. Local repository

  2. if you want to make it accessible by everyone, make it a remote repository

    git init

  3. git status

    On branch master

    No commits yet

    we need to remove the master branch to work on the main branch

    REMOVE the git - bi directly deleting the .git folder

  4. Again Start the git, if you want to work on the main branch

    git init -b main

    and Then Check git status

  5. Congratulations we Are in the main branch