Git · Everyday workflow

git add

Stages a specific change for the next commit. Use git add -p to stage part of a file.

Syntax
git add <path>

Example

Example
git add src/app.ts
git add --patch

More in this group

git blame git commit git commit --amend git diff git fetch git log git mv git pull

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course