How to make git status show only staged files

后端 未结 4 618
野趣味
野趣味 2020-11-30 23:56

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 go

4条回答
  •  广开言路
    2020-12-01 00:25

    to view staged files with code changes

    git diff --staged   
    

    or using --cached which is synonym for --staged

    git diff --cached
    

    or to view only file names without code changes

    git diff --staged --name-only  
    

    git-diff manual

提交回复
热议问题