What is Git ? | What is Version Control System ? | Basic Operation of Git
What is Git ?
Git is a free and open source distributed version-control system, developed by Linus Torvald, It is used to track any changes of file/set of file / source code during software development.
Git is a free and open source distributed version-control system, developed by Linus Torvald, It is used to track any changes of file/set of file / source code during software development.
What is Version Control System ?
Tracking/Managing all the changes during the software development called the Version Control System.
There are two type of VCS
1 - Centralization Version Control System - SVN, CVS
Centralization Version Control System |
Basic Operation in Git
- Initialize
- Add
- Commit
- Push
- Pull
Initialize : It is used to create an empty directory or re-initialize existing directory one from the repository. For the initialize we use "git init" command, this command will create .git directory with sub-directory and there templates file. after the successfully initialize we will create or add our files/code.
git init
We can see the index with the help of "git status" command, it will lists all the modified files which are ready to be added to the local repository.
git status
Add : It is used to update index by current content found in the working tree/directory. now we are ready to commit
git addCommit : It is used to commit the code
git commitgit commit -m "messages of code"
Push : It will used to publish all the commits/changes from the local repository to remote repository
git push
Pull : It will use to fetches changes from a remote repository to a local repository
git remote add origin <Git Repo URL>git pull origin mastergit pull origin <branch name>git pull
Thanks,
Leave a Comment