1. 打開 git bash
執行: touch .gitignore
2. 會生成一個“.gitignore” 文件
輸入以下代碼。下次上傳將會自動過濾掉
node_modules/
dist/
配置規則:
- 以斜槓“/”開頭表示目錄;
- 以星號“*”通配多個字符;
- 以問號“?”通配單個字符;
- 以方括號“[]”包含單個字符的匹配列表;
- 以歎號“!”表示不忽略(跟蹤)匹配到的文件或目錄;
1. 打開 git bash
執行: touch .gitignore
2. 會生成一個“.gitignore” 文件
輸入以下代碼。下次上傳將會自動過濾掉
node_modules/
dist/
配置規則:
腳本如下: 1 # coding: utf-8 2 3 """ 4 該腳本主要做把源目錄下所有文件,照搬原路徑基礎上覆制文件 5 """ 6 7 import os 8 # import shutil