I would like to get a list of only the staged filenames. I can't find the equivalent flag for --name-only
for the git status
command. What is a good alternative?
The file list will be piped to php -l
(PHP lint syntax checker).
Solution: the complete command
git diff --name-only --cached | xargs -l php -l
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…