Start a Project

  1. Create new repo: git init
  2. Clone existing repo: git clone <repo-url>

Basic Workflow:

Working Directory → Staging Area → Repository

  1. git status
  2. git add .
  3. git commit -m “message”
  4. git push

Undo Mistakes

  1. Unstage file
  2. Undo last commit (keep changes)
  3. Discard changes

Branching

  1. Create branch: git branch feature-login