Git Basics Every Beginner Should Know

Coding Guides 1 min read
Git Basics Every Beginner Should Know

The handful of Git commands you will use every day, explained in plain words with copy-ready examples.

Git keeps a history of your code so you can experiment without fear. You only need a few commands to start.

Start a project

# create a new repository in the current folder
git init

# see which files changed
git status

Save your work

# stage the files you want to save
git add index.html style.css

# save a snapshot with a message
git commit -m "Add home page layout"

Try ideas on a branch

# create a branch and switch to it
git switch -c new-header

# go back to the main branch
git switch main

Share with GitHub

git remote add origin https://github.com/your-name/your-repo.git
git push -u origin main

Commit small and often. A clear message like Fix mobile menu is easier to find later than update.

Ready to go further? Our courses use Git in every project.

Scroll to Top
🛒 YOUR CART (0)
🛒

YOUR CART IS EMPTY

Explore courses, ebooks, prompt packs and more.

BROWSE PRODUCTS →