Command

Git Stage a File Command

The Git command to stage a file is git add <file>.

Quick Answer

Command
git add <file>
GitCommand

Stage a File

Type this command
git add <file>

Stages one file for the next commit.

Learn More

How to stage a file in Git

  1. Open the terminal or command interface for Git.
  2. Type git add <file>, replace any placeholders, and run it.

Git Stage a File Command

Run git add <file>.

Related Commands

Frequently asked questions

What is the Git command to stage a file?

Run git add <file>.

Where do I type this Git command?

Type it in the terminal or command-line interface used by Git.

Does this Git command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify