Git全局配置

  1. git config --global user.name "John Doe"
  2. git config --global user.email johndoe@example.com
  3. git config --list //然后查看自己的配置

也可以根据项目单独配置

  1. $ git config user.name gitlabs Name
  2. $ git config user.email gitlab@xx.com
  3. $ git config --list

.gitignore 忽略文件配置

  1. # System
  2. .DS_Store
  3. # Package Manager
  4. node_modules
  5. # Bundle
  6. /dist
  7. *.rar
  8. # local env files
  9. .env.local
  10. .env.*.local
  11. # Log files
  12. npm-debug.log*
  13. yarn-debug.log*
  14. yarn-error.log*
  15. pnpm-debug.log*
  16. # Editor directories and files
  17. .idea
  18. .vscode
  19. *.suo
  20. *.ntvs*
  21. *.njsproj
  22. *.sln
  23. *.sw?