用户home目录下的.gitconfig 和 库文件夹目录下的 .gitignore 示例

本文介绍如何自定义Git配置文件.gitconfig,包括设置编辑器、合并工具和差异工具,以及如何创建.gitignore文件来管理忽略文件。

.gitconfig文件:

[user]
    name = hzh
    email = 924948@qq.com

[core]
    editor = vi
    quotepath = false
# git config --global core.autocrlf true
autocrlf = true
# git config --global core.whitespace cr-at-eol
whitespace = cr-at-eol
[merge] tool = kdiff3 [mergetool "kdiff3"] #path = E:/playground/softwares/KDiff3/kdiff3.exe keepBackup = false trustExitCode = false [diff] tool = kdiff3 [difftool "kdiff3"] #path = E:/playground/softwares/KDiff3/kdiff3.exe keepBackup = false trustExitCode = false [alias] co = commit br = branch ch = checkout st = status last = log -1 HEAD [color] diff = auto status = auto branch = auto [push] default = matching

 

.gitignore文件:

#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Dd]ebug*/
*.lib
*.sbr
obj/
out/ [Rr]elease*/ _ReSharper*/ [Tt]est[Rr]esult*
[Bb]in
/gen
*.class
*.o
*.so
# *.so.*
*~
*.orig
/proguard

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值