.gitignore 文件的作用

2019-03-25  本文已影响0人  枫_d646

配置 git 需要忽略的文件或文件夹,在 .gitignore 文件配置的文件或文件夹不会随着 git 提交到你的仓库

# 进入你的目录,在 Git Bash 中执行下面命令,根据自己需要配置,可以参考下面相关链接内容
touch .gitignore
## mac 操作系统配置演示,如下配置 git 就会忽略下面配置的文件,例如系统文件 .DS_Store

# Created by https://www.gitignore.io/api/macos
# Edit at https://www.gitignore.io/?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# End of https://www.gitignore.io/api/macos
相关链接
上一篇 下一篇

猜你喜欢

热点阅读