提交之前使用git status可以看到将要提交的文件,如果想部分提交,需要单独commit。使用下面这句可以快速commitgit commit `git status | grep 'mod' | awk '{print $3}' | grep -v 'index'`git commit 后面跟的不是单引号,键盘位置在esc下面或者数字1左边awk '{print $3}' 是选中第三列grep -v 是排除某个包括该字符串的文件,此处是排除index.php