Git & GitHub for Developers Essential Git Commands
3 / 11
Next
Essential Git Commands ~15min

Git Commands You Need Every Day

Open your terminal and learn these commands:

Setup (one time)

git config --global user.name "Your Name"
git config --global user.email "you@email.com"

Start a project

git init           # Start tracking a folder
git clone URL      # Copy a GitHub repo

Daily workflow

git status         # See what changed
git add .          # Stage all changes
git commit -m "Your message"  # Save changes
git push           # Upload to GitHub
git pull           # Download latest changes

Branches

git branch feature  # Create branch
git checkout feature # Switch to it
git merge feature   # Merge back
Preview