Skip to main content

Basic Git Commands

Great start! Now, let’s learn the most important Git commands. These are your tools for saving, viewing, and sharing your work.

Common Commands

  • git init: Start a new Git repository
  • git status: See what’s changed
  • git add: Stage changes for commit
  • git commit: Save your changes
  • git log: View commit history

Example workflow:

git init
git add index.html
git commit -m "Add homepage"
git status
git log
tip

Use clear commit messages so you remember what changed!

What's Next?

Ready to work on different features? Next: Branching in Git.