Git - Version Control System
Git - Version Control System
Git - Version Control System
History
Linux uses version control system to develop Linux OS as its developers are spread
all across the world.
In 2005 - Previous Linux kernel development tool, BitKeeper, revoked free service.
Creator of Linux, Linus Torvalds begins to develop own method, with the following
design goals:
o
Speed
Simple Design
Fully Distributed
Introduction
Git is afree and open source distributed version control system designed
to handle everything from small to very large projects with speed and
efficiency.
Version control is a system that records changes to a file or set of files
over time so that you can recall specific versions later.
Installation
Git can be downloaded from the official GIT website:
http://git-scm.com/downloads
Once installed no further configuration is required.
Git is basically a command line utility but can be used in GUI form via
other IDEs eg: Eclipse, Brackets, Code
First Use
When using for the first time it is required to provide information so as
to manage user profile while editing code. This is required only once.
Command:
git config --global user.name Mahendra"
git config --global user.email m.kr@outlook.com
Creating a repository
Use cd to move to the directory where you are working.
Type in git init
This creates the repository. A hidden directory named .git in the same
folder
Type in git add .
Commit
git add newFile1
Committing makes a snapshot of everything being tracked into your
repository
A message telling what you have done is required
git commit m another change
Social Coding
git pull remote_repository
Get changes from a remote repository and merge them into your own
repository
git status
Git shows the changes you made.
Work on the files.
git commit m Name of the change you made
git push
References:
1.
2.
http://www.git-scm.com/
https://try.github.io/levels/1/challenges/7
3. Documentation: http://www.git-scm.com/doc