先把本地缓存删除(改变成未track状态),然后再重新提交。 git rm -r --cached . git add . git commit -m 'reset update .gitignore' git push