What is Git ? What are the basic git commands ?

Hello everyone!

As I have just started my web development journey with ineuron.ai, today I was introduced to Git by Hitesh sir , I understood the necessity of learning Git as I searched for it, The assignment on writing an article about Git is definitely helping me to understand it better, Here, I am going to share a brief idea on What is Git ? What is GitHub ? and some basic commands.

Version Control System(VCS): It is very useful for developers to keep the complete history of their work. it maintains the history of all version of a project file. It has two types,

  - Centralized version control system (CVCS).
  - Distributed/Decentralized version control system (DVCS)

Git: Git is a distributed version control system. It refers to the practice of tracking and managing changes to software code. it doesn't depend on central server to store all versions of a file. So a user can have the history of a file and its version in their own account. It is free and an open source.

GitHub: It is a web based git repository hosting service. It offers distributed version control and source code management(SCM) functionality of git.

Some basic commands in git:

*git branch <branch-name>*--> It creates a  branch locally.

*git push -u <remote> <branch-name>*--> It will push the branch to new repository.

*git add <file>*  --> to add a single file to the repository.

*git branch --list*-->to see the branches.

*git branch -d <branch-name>*--> to delete a branch.

*git clone <https://name-of-the-repository-link>*-->to get a source code from remote 
  repository.

*git add -A*  -->to add all files at once

*git commit -m "commit message *-->' git add ' alone won't save changes in 
repository.so we have to use git commit command. But it saves changes only locally.

*git push <remote> <branch-name>*-->It will push our changes of files to the remote 
repository.

*git push -u origin <branch_name>*-->to upload the branch. It will upload the 
committed commands only.

*git pull <remote>*-->to get updates from the remote repository.

 git revert -->to undo the changes that we made.  

I know there is always room for improvement, kindly share views on what more can be added to improve my learning.

Thank you !!