如何通过在末尾添加 !*.css 来修改我的 .gitignore 文件?

How do I modify my .gitignore file by adding !*.css at the end?

我是 pulling/pushing 代码和 gitignore 的新手,我不知道如何修改 .gitignore 文件。

你可以简单地做:

echo "!*.css" >> .gitignore
git add .gitignore
git commit -m "Whitelist css files"
git push -u origin master

这将更新您的 .gitignore 文件。