2. Introduction
Git is a version control system (VCS) for tracking changes in computer files and
coordinating work on those files among multiple people.
It is primarily used for source code management in software development, but
it can be used to keep track of changes in any set of files
Git was created by Linus Torvalds in 2005 for development of the Linux kernel,
with other kernel developers contributing to its initial development. Its current
maintainer since 2005 is Junio Hamano.
As with most other distributed version control systems, and unlike most client–
server systems, every Git directory on every computer is a full-
fledged repository with complete history and full version tracking abilities,
independent of network access or a central server.
Like the Linux kernel, Git is free software distributed under the terms of
the GNU General Public License version 2.
3. Basic Git commands
git st - Show the working tree status like file a is modified and file b is
newly added.
git add <file name> - Add file contents to the index
git commit -m “message1” - Record changes to the repository
git pull – Fetch from and integrate with another repository or a local
branch (fetch + merge)
Useful when you are working on your local branch and you want to merge
your changes with the latest central repo.
4. Contiue…
git checkout <file A> – it will revert your all changes of file A in local
branch
git blame <file A> - it will show all the modification done to file A with the
person name , time and line no. It helps to migrate changes done by a
particular person in file A, to another file or project.