git-gitignore

mac环境:

//创建gitignore_global文件这个是用来所需要配置的文件
touch ~/.gitignore_global

//使用vim打开gitignore_global
vim ~/.gitignore_global

-

# IntelliJ project files
.idea/*
*.iml
out
gen### Go template
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

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

 

写入git的配置文件里:

//$HOME/.gitconfig就是gitconfig的路径的
git config --global core.excludesfile $HOME/.gitignore_global

查看是否成功:

git config --list
credential.helper=osxkeychain
user.name=zwgg
user.email=z***5@126.com
core.excludesfile=/Users/zhu/.gitignore_global

 

posted @ 2018-09-26 16:38  静静别跑  阅读(144)  评论(0编辑  收藏  举报