introduction to Git

What is VCS?

  • A version control system is a system that allows you to control and manage different versions of your source code
  • How would you manage file versions without VCS?
  • How would you design a version control system?

Git Basic workflow

  • Working directory
  • Staging area
  • Local repo
  • Remote repo

How git works

  • HEAD
  • Branch
  • Tree
  • Commit
  • Blob

merging & rebasing

  • Both merging and rebasing are designed to integrate changes from one branch into another
  • Merging: always creates a special commit called merge commit
  • Rebasing: no additional commit is created, thus resulting in cleaner commit history; keeps commit history linear
  • Rule of thumb: prefer rebasing when you are on feature branch
git rebase origin/master

github pages

GIT WILL BE YOUR LIFETIME FRIEND!

Coding Ninjas Bootcamp - Class 2: Git

By Zico Deng

Coding Ninjas Bootcamp - Class 2: Git

Introduction to Git

  • 125