Git的windows开发与linux开发配置

Git的基本配置

安装

配置

  1. 分为系统配置--system、全局配置--global、项目配置--local
    配置名称和邮箱
bash 复制代码
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
  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协议:

相关推荐
K·Herbert6 分钟前
最新CentOS 7 yum源失效的解决方案(2025年6月)
linux·运维·centos
黄豆匿zlib35 分钟前
Python中的其他数据结构:除了列表和元组,还有哪些?
数据结构·windows·python
别骂我h37 分钟前
部署KVM虚拟化平台
linux·运维·服务器
繢鴻39 分钟前
紧急救援!Ubuntu崩溃修复大赛
linux·服务器·ubuntu
90wunch1 小时前
更进一步深入的研究ObRegisterCallBack
c++·windows·安全
BraveOxCow1 小时前
git的使用
git
啾啾Fun1 小时前
Python类型处理与推导式
开发语言·windows·python
Serendipity_筱楠1 小时前
Windows安装部署jenkins
windows·ci/cd·自动化·jenkins·测试
FL16238631291 小时前
[windows工具]PDFOCR识别重命名工具1.3 版本使用教程及注意事项
windows
midsummer_woo2 小时前
windows系统安全加固
windows·安全·系统安全