An Introduction To Git
An Introduction To Git
By - Nihal Singh
What is Git ?
• Git is a distributed version control software.
• It is used to store multiple version of your software on your machine.
• Nowadays, it is being used for deploying your code from your local machine
to some staging server to some testing server and ultimately to production.
• It’s become an integral tool for deploying your code to cloud.
Remote Server
( Test successful )
3. To check Git is installed successfully, open Git Bash (Git Bash comes included as part of
5. Commit the file or the new changes in new file ( Command - git commit –
m “a msg” )
6. Check the commits or the history of the repo ( Command - git log )
Concept of branch in Git
Branching means you diverge from the main line of development and continue to do work
without messing with that main line commonly known as ‘master’ branch [1]
Creating and merging branches in Git
1. Checking the current branch on which we are working and number of branches ( Command -
git branch )
2. Creating the new branch. For the sake of the example, let’s name it ‘testing’ ( Command -
git branch testing )
4. Merging the newly created branch with the ‘master’ branch ( Command - git
checkout master) ( Command - git merge testing)
Git vs Github [2]
Git Github
• It is a software • It is a service
• It is installed locally on the system • It is hosted on the Web
• It is a command-line tool • It provides a graphical interface
• It is a tool to manage different versions of • It is a space to upload a copy of
edits made to files in a git repository your Git repository
• It provides functionalities like Version Control • It provides functionalities of Git like VCS and
System Source Code Management Source Code Management, as well as adding
few of its own features
Alternatives & Competitors to Git [3]
1. https://git-scm.com/
2. https://dzone.com/articles/git-vs-github-demystifying-the-differences
3. https://www.g2.com/products/git/competitors/alternatives