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协议:

相关推荐
微露清风5 小时前
系统性学习Linux-第二讲-基础开发工具
linux·运维·学习
不会代码的小猴6 小时前
Linux环境编程第六天笔记--system-V IPC
linux·笔记
阳光九叶草LXGZXJ6 小时前
达梦数据库-学习-48-DmDrs控制台命令(同步之Manager、CPT模块)
linux·运维·数据库·sql·学习
诸神缄默不语6 小时前
Linux命令行教程
linux
i建模8 小时前
如何在Arch Linux中重设忘记的root密码
linux·运维·服务器
川川菜鸟9 小时前
Claude Code 安装与配置完整指南(Windows)
windows
kida_yuan9 小时前
【Linux】运维实战笔记 — 我常用的方法与命令
linux·运维·笔记
@syh.10 小时前
【linux】进程控制
linux
PfCoder10 小时前
WinForm真入门(23)---PictureBox 控件详细用法
开发语言·windows·c#·winform
Mr_Xuhhh11 小时前
MySQL表的增删改查(CRUD)操作详解
数据库·windows