In the root directory of the project, right click and choose Git Bash
to enter the command line;
At the command line, type:
touch .gitignore
Generate .gitignore
documents;
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*