Is there any way to get a list of files that will be committed when I type the following?
git commit -m \"my changes\"
git status lists too muc
I know OP original asked to avoid git status
, but I felt this would be nice to leave for posterity (i.e other people who don't share OP's reservations).
git status --porcelain | grep -v '^[ |??]' | sed -e 's/[A-Z] *//'
My reasoning is that git status --porcelain
seems like it was built for exactly this type of quandary...
source: http://git-scm.com/docs/git-status.html
EDIT:
You may chose to not use sed -e 's/[A-Z] *//'
if you wish to keep git's modification tags in front of each file name.