Git Add

Learn how to add files to the staging area before committing.

TutorialsGit Tutorial › Git Add

Git Add

Learn how to add files to the staging area before committing.

This lesson is part of the Softlookup Git tutorial for beginners and includes a simple command example, explanation, common mistakes, and related Git lessons.

Git Command Example

git add file.html
git add .

How It Works

Git commands help you track project changes, save snapshots, compare files, and collaborate with other developers. Run commands from a terminal inside your project folder.

Try It Yourself

  1. Install Git on your computer.
  2. Open Command Prompt, Terminal, or Git Bash.
  3. Create or open a project folder.
  4. Run the command example.
  5. Use git status to check what changed.

Common Mistakes

  • Running Git commands outside the project folder.
  • Forgetting to add files before committing.
  • Using unclear commit messages.
  • Pulling remote changes without checking local changes first.

Related Git Lessons

Git Tutorial Home | Git Status | Git Add | Git Commit | Git Branch | GitHub Basics