Stage all modififed files for commit (but not new, untracked)
git add $(git status | awk '/modified/ { print $3 }')
Alternately:
git add $(git status -s | awk '/^ ?M/ { print $2 }')
Also, to unstage modified files:
git reset HEAD $(git status -s | awk '/^ ?M/ { print $2 }')
Written by Tim Serong
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#