title revealOptions
Version Control with GIT
transition
zoom

Version Control with GIT

A Short Introduction


Hello friends! 👋 My name is Tauqeer Ahmad
I am Assistant Project Manager @ POWERSOFT19 🏫, Fullstack Developer 🥞, and Your trainer for this session 👌

The Three States


This is the main thing to remember about Git if you want the rest of your learning process to go smoothly.

Git has three main states that your files can reside in: committed, modified, and staged



Local Operations



  1. You modify files in your working directory.
  2. You stage the files, adding snapshots of them to your staging area.
  3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.



Getting a Git Repository


Initialize

git init

Status

git status

Difference

git diff


GIT Branches


All Branches

git branch

Create Branch

git branch [name-of-branch]

Checkout

git checkout [name-of-branch]


GIT Workflow