master ,这是我的小站,欢迎访问哦~~

.gitconfig

仅仅记录我的配置,仅供参考。已脱敏。

[user]
    name = your_name                # 设置 Git 提交时使用的用户名
    email = your_email@example.com   # 设置 Git 提交时使用的邮箱

[http]
    proxy = url:port                # 设置 HTTP 代理
    sslVerify = false                # 忽略 SSL 证书验证

[https]
    proxy = url:port                # 设置 HTTPS 代理
    sslVerify = false                # 忽略 SSL 证书验证

[encoding]
    encoding = utf-8                # 设置编码为 UTF-8

[difftool "sourcetree"]
    cmd = "'' "

[mergetool "sourcetree"]
    cmd = "'' "
    trustExitCode = true    

[core]
    editor = vim                    # 设置默认的文本编辑器为 vim
    excludesfile = ~/.gitignore_global  # 指定全局忽略文件
    autocrlf = input                # 在 macOS/Linux 上,自动转换换行符
    repositoryformatversion = 0     # Git 仓库格式版本
    filemode = true                 # 是否考虑文件权限
    bare = false                    # 是否为裸仓库,false 表示不是
    logallrefupdates = true         # 是否记录所有引用的更新 
    preloadIndex = true             # 性能优化      
    ignorecase = true               # 忽略文件名大小写            
    encoding = utf-8                # 设置编码格式为 UTF-8

[color]
    ui = auto                       # 自动启用颜色输出
    branch = auto                   # 自动启用颜色输出
    diff = auto                     # 自动启用颜色输出
    status = auto                   # 自动启用颜色输出

[push]
    default = simple                # 设置推送行为为简单模式

[log]
    abbrevCommit = true             # 缩短提交哈希值
    date = relative                  # 日志日期显示为相对时间

[alias]
    co = checkout                   # 设置别名 'co' 为 'checkout'
    br = branch                     # 设置别名 'br' 为 'branch'
    ci = commit                     # 设置别名 'ci' 为 'commit'
    st = status                     # 设置别名 'st' 为 'status'
    lg = log --oneline --graph --decorate  # 设置别名 'lg' 为一个更友好的日志输出格式
    last = log -1 HEAD              # 查看最后一次提交
    unstage = reset HEAD --         # 取消暂存
    amend = commit --amend          # 修改最后一次提交

[merge]
    tool = meld                     # 设置合并工具为 meld

[commit]
    template = ~/.gitmessage.txt    # 设置提交消息模板文件
    gpgSign = true                  # 启用 GPG 签名提交

[init]
    defaultBranch = main            # 初始化时默认分支为 main

[credential]
    helper = cache --timeout=3600   # 缓存凭证1小时

[gpg]
    program = gpg                   # 指定 GPG 程序