Introduction To Git

April 13, 2018

What Is Git?

A Version Control System(VCS) for tracking changes in computer files.Initially created in 2005 by  ‎Linus Torvalds who was also the creator of Linux.There is no specific language or framework,or anything you need to use git.You can use it for static html web sites,Nodejs apps ,Python,Java,Php,C# anything at all.It store your files.

Git Is


Distributed version control- Many developers can work on single project without having to be on same network .
Coordinates work between multiple developers -  tracks every single version and every single change that change on the system or the project
Revert back at any time - can revert back to any file,any time as long as it committed to the repository
Local & remote repository-Usually when we use git there is a repository in our machine that you work on make changes,and then you uploaded to or push it to remote repository.Something like GitHub or Bitbucket.Then you can push your local repository to the remote one.
Don't need internet connection to work on repository locally,but when you want to push it into a remote repository you will need a internet connection.


Concepts Of Git

*Keep track of code history
*Takes "snapshots" of your code
*You decide when to take a snapshot by making a "commit"
*You can visit any snapshot at anytime
*You can stage files before committing


Basic Commands

$ git init                    //Initialize local git repository
$ git add <file>        //Add file(s) to index
$ git status             //Check status of working tree
$ git commit         // Commit changes in index
$ git push             //Push to remote repository
$ git pull              //Pull latest from remote repository
$ git clone          //Clone repository into a new directory

You Might Also Like

0 comments

Search Here