How can I run “git status” and just get the filenames

后端 未结 9 1555
遥遥无期
遥遥无期 2020-12-04 14:23

as opposed to the long relative path?

9条回答
  •  情深已故
    2020-12-04 14:47

    In addition to the accepted answer, another way of doing it is with awk

    git status --porcelain | awk '{ print $2 }'
    

    The $2 selects second the column of each line.

提交回复
热议问题