git directory upload ignored node_modules

In the root directory of the project, right click and choose Git Bashto enter the command line;

At the command line, type:

touch .gitignore

Generate .gitignoredocuments;

Filtering the input information in the file, the filter rules are as follows:

node_modules/   表示过滤这个文件夹
*.zip   过滤zip后缀文件
demo.html   过滤该文件

Configuration of my project is:

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Published 124 original articles · won praise 9 · views 20000 +

Guess you like

Origin blog.csdn.net/p445098355/article/details/104788657