Courses / GitHub
6. Staging changes with git add
Selecting files and hunks to include in the next commit by using git add with paths and options.
Git / Bash
Staging changes with git add
Selecting which file changes become part of the next commit by using git add paths, patterns, and interactive modes.
"I want to commit only the parts of my work that are ready, not everything in my working folder."
git add tells Git which modified or new file contents should be recorded in the next commit; unstaged changes are left out until added. You can add whole files, path patterns, or fine-grained hunks interactively.
"I want to commit only the parts of my work that are ready, not everything in my working folder."
git add tells Git which modified or new file contents should be recorded in the next commit; unstaged changes are left out until added. You can add whole files, path patterns, or fine-grained hunks interactively.