GitBasics

git add

Stages changes so they'll be included in the next commit.

Syntax

git add <pathspec>...

Examples

Stage a specific file

git add src/index.ts

Stage everything in the current directory

git add .

Related commands