如何让git状态仅显示暂存的文件 [英] How to make git status show only staged files
问题描述
我想只列出阶段性文件名。我无法为 git status
命令找到 - name-only
的等效标志。什么是好的选择?
文件列表将被传送到 解决方案:完整的命令 I would like to get a list of only the staged filenames. I can't find the equivalent flag for The file list will be piped to Solution: the complete command
Use 这篇关于如何让git状态仅显示暂存的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! php -l </ code>(PHP lint语法检查器) 。
git diff --name-only --cached | xargs -l php -l
git diff --name-only
(用 - cached
来获取暂存文件) --name-only
for the git status
command. What is a good alternative?php -l
(PHP lint syntax checker).git diff --name-only --cached | xargs -l php -l
git diff --name-only
(with --cached
to get the staged files)