Git的windows开发与linux开发配置

Git的基本配置

安装

配置

  1. 分为系统配置--system、全局配置--global、项目配置--local
    配置名称和邮箱
bash 复制代码
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
  1. 配置跨平台换行符
bash 复制代码
windows上:
git config --global core.autocrlf true
linux上:
git config --global core.autocrlf input
如果项目全在windows上:
git config --global core.autocrlf false
  1. 中文支持
    i18n.commitencoding存储git commit log时的编码
    i18n.logoutputencoding查看git log时的编码
bash 复制代码
# 中文编码支持
git config --global gui.encoding utf-8
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
# 显示路径中的中文
git config --global core.quotepath false
  1. 与服务端的认证配置
    http协议
bash 复制代码
设置口令缓存:
git config --global credential.helper store
添加 HTTPS 证书信任 :
git config http.sslverify false

ssh协议:

相关推荐
brucelee1862 分钟前
Claude Code 安装教程(Windows / Linux / macOS)
linux·windows·macos
jsons129 分钟前
给每台虚拟机设置独立控制台密码
linux·运维·服务器
嵌入式×边缘AI:打怪升级日志1 小时前
全志T113 Tina-SDK 配套工具链开发应用(从Makefile到CMake再到Autotools)
linux
嵌入式×边缘AI:打怪升级日志1 小时前
全志T113嵌入式Linux开发环境搭建(VMware + Ubuntu 18.04)详细步骤
linux·ubuntu
云栖梦泽2 小时前
Linux内核与驱动:14.SPI子系统
linux·运维·服务器·c++
yipiantian2 小时前
在Claude项目中实现跨目录访问Skills
linux·运维·服务器
cen__y3 小时前
Linux07(信号01)
linux·运维·服务器·c语言·开发语言
MT5开发3 小时前
Linux安装MariaDB
linux·运维·mariadb
Lentou3 小时前
日志轮询策略
linux·服务器·网络
Yoyo25年秋招冲冲冲3 小时前
【亲测可用】ubuntu系统下安装Openclaw+配置飞书
linux·ubuntu·ai·飞书·openclaw