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

相关推荐
IsJunJianXin5 分钟前
pdd小程序 cdp 保存响应体
linux·服务器·小程序·pdd小程序·拼多多响应体解密·小程序cdp·拼多多rpc取响应体
南大白17 分钟前
IntelliJ IDEA 运行时的 JVM 本地内存溢出崩溃
git
爱就是恒久忍耐19 分钟前
现代CMake的build方式
linux·运维·服务器
码农小旋风1 小时前
Claude Code 基础用法大全:对话、分析、修改、测试、Git 和工作流
人工智能·git·chatgpt·claude
古城小栈1 小时前
Python 的主流Ai框架为什么优先适配 Linux 系统?
linux·人工智能·python
南大白1 小时前
Git 撤回提交完整方案
git
像风一样的男人@2 小时前
python --实现代理服务器
git·ui
vx-Biye_Design2 小时前
springboot安阳地区研学旅游服务小程序-计算机毕业设计源码12785
java·vue.js·windows·spring boot·tomcat·maven·mybatis
gc_22992 小时前
学习在Windows中基于Docker部署Dify的步骤
windows·docker·dify
sbjdhjd2 小时前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins