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

相关推荐
特种加菲猫10 分钟前
指尖上的魔法:优雅高效的Linux命令手册
linux·笔记
★Orange★28 分钟前
Linux Kernel kfifo 实现和巧妙设计
linux·运维·算法
bemyrunningdog43 分钟前
Mock数据
linux·运维·ubuntu
小妖6661 小时前
git branch -a 还有一些已经删除了的分支
git
是阿建吖!1 小时前
【Linux | 网络】网络编程套接字
linux·网络
退役小学生呀1 小时前
十、K8s集群资源合理化分配
linux·云原生·容器·kubernetes·k8s
Winner13002 小时前
Debian、Buildroot 和 Ubuntu 都是基于 Linux 的系统区别
linux·ubuntu·debian
1nullptr2 小时前
UNIX程序设计基本概念和术语
linux
是阿建吖!3 小时前
【Linux | 网络】网络基础
linux·网络
mmoyula3 小时前
【RK3568 驱动开发:实现一个最基础的网络设备】
android·linux·驱动开发