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主控部分(六)】
linux·物联网·嵌入式linux
半夜删你代码·5 分钟前
PC端上拉加载效果
windows
IMPYLH8 分钟前
Linux 的 id 命令
linux·运维·服务器·bash
福尔摩斯张12 分钟前
一文搞懂74HC595芯片(附详细使用方法)
linux·服务器·网络·单片机·嵌入式硬件
xlq2232214 分钟前
37 内核与用户_信号
linux·运维·服务器
武藤一雄21 分钟前
C#万字详解 栈与托管堆 的底层逻辑
windows·microsoft·c#·.net·.netcore
时空无限26 分钟前
git 文件冲突之后如何操作
git
酌量35 分钟前
nvidia orin agx刷机忘记CUDA runtime,安装torch和cuda
linux·笔记·ubuntu·torch·cuda·agx
满天星830357742 分钟前
【MySQL】表的基本查询(上)
linux·服务器·数据库·mysql
yuanlaile1 小时前
Linux Docker、Swarm、K8s分布式部署全集解析
linux·docker·kubernetes·k8s实战