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

通用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
*.zip
*.7z

package-lock.json
yarn.lock

公共

Some common .gitignore configurations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

hexo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
dist/
.deploy*/
.vscode
.deploy_git
package-lock.json
yarn.lock
Jenkinsfile
source/_posts/SyncToy*

uni-app

1
2
3
4
5
6
7
8
9
node_modules/
dist/**
unpackage/
.DS_Store
.project
.hbuilderx/
.vscode
wxcomponents/**/*.vue
wxcomponents/**/*.css

附:Dcloud示例项目中的.gitignore

清除unpackage在git中的缓存

1
git rm -r --cached unpackage