'git add' option to non-interactively stage working tree changes

From: Hrvoje Nikšić <hidden>
Date: 2016-06-15 22:50:21

Is there a way to non-interactively instruct git to stage all changes
in the working tree, specifically those that would be detected by "git
add -p" or "git commit -a"?

One can use "git add" for this purpose, but it is necessary to specify
the root, and with the unpleasant side effect of adding untracked
files. "git add -u" avoids the file addition, but root still has to be
spelled out. "git add -p" does exactly the right thing, but requires
interaction. I would like an automated --yes-to-all version of "git
add -p".

Specifying the root may seem innocuous, but it is inconsistent with
"git diff" and "git commit [-a]", which don't care where in the tree
you are.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help