How do I list just the files that would be committed?

后端 未结 4 1366
闹比i
闹比i 2021-02-01 15:33

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

4条回答
  •  有刺的猬
    2021-02-01 15:42

    You can try:

    git diff --name-status
    

    I get the following:

    $ git diff --name-status
    M       README.markdown
    

    Without the untracked files.

提交回复
热议问题