Git Overview



What is Git?


• Git is a distributed version control system (VCS) that stores reference points to snapshots of your code
• This creates a linear timeline of all your changes which allows you to go back in time to earlier snapshots in the event that you messed up your current code or if you need to look at something that you did previously
• VCS available: Git, Mercurial, Subversion
• Git was largely created by Linus Torvalds, the founder of the Linux kernel

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Git vs. Github



images/122-1.png

Git is a version central system (VCS)
Github is a central code repository based on Git VCS technology

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Install Git



which git
sudo apt install git-core


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Basic Git Workflow



Working Directory → Staging Area → Git Repository


Working Directory
◇ Where we put all the files and directories and changes

Staging Area
◇ Where Git listens to changes in this area

Git Repository
◇ Where all our snapshots are stored

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Further Reading


• Pro Git Book (free): https://git-scm.com/book/en/v2
• Tutroials: https://git-scm.com/doc/ext
• Git 100: Basics of the git version control system
• Git 101: Branching
• Git 102: Using git with servers

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Source


• A Brief Introduction to Git in Programming Fundamentals

Index