Git
This image taken by git.com
Introduction of Git: — Git is developed by Linus Torvald in 2005. Git is software from which we can download and user for free It is version control system. It is an open-source software that’s allow multiple developer works together. git has benefit that we can use it local machine without internet.
Functions of version control system: -
1.Centralized version control system: — Centralized version control system has a central repository that contains all of the version of code.
There have also been some drawbacks in the Centralized version control system which are shown below
- It is locally available meaning you always need to be connected you a network to perform and action,
- Since everything is a centralize if central server gets failed you will loss entire data.
2. Distributed version control system:-In distributed version control system every contribute has local copy or clone of the main repository i.e., everyone maintains a local repository of them on which contain all the files and metadata preset in main repo.
Some Commands of Git
Git init-Create new repository
git add-Add files in the staging area
git commit-Change file to the local repository
git status-This command shows the current start of the repository.
git config-In the git many configurations and settings like user, user name, user email
git branch-To determined what branch the local repo is on ass a new branch or delete a branch
git checkout-To start working in a branch use git checkout to switch branch
git merge-Integrated branch together git merge combines the changes from one branch to another branch
git pull-To get the latest version on repository
git clone-To connect a local repository with a remote
git push-Send local commit to the remote repository
git clean-Remove untrack files from the working directory
git fetch-Fetching download a branch from another repository
git log-It provides several formatting options for displaying committed snapshot
git reset-Resetting allows you to clean up or completely remove change that have not been pushed to the public repository
Advantages of Git: -
- Free and open source
- Fast
- Implicit backup
- Security
Summary: — Git is a version control system. In git we can perform many operations like commit. git add, git clone and etc. and it is very good way for developer to manage his code easily.