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

相关推荐
曦夜日长18 小时前
Git系统篇,Git本地使用(一):从“究极进化版“到三个区域的底层原理
大数据·linux·git·elasticsearch
shimly12345619 小时前
给断网无 sudo ubuntu22.04 机器安装 nodejs
linux
别动我齐刘海20 小时前
Linux 系统调试学习1
linux·运维·服务器·c++·学习·机器学习·机器人
Lsetea21 小时前
OpenSSL报certificate chain too long:error 22与verify_depth深度排查
linux·https·ssl证书·openssl·证书链
宵时待雨21 小时前
GIT版本管理2:远程操作与多人协作
git
鬼手点金21 小时前
opencode-rules 插件
java·开发语言·前端·人工智能·chrome·git·github
不像程序员的程序媛1 天前
linux常见文本操作命令
linux·运维·服务器
wangbing11251 天前
开发指南149-IotDB-常用命令
linux·运维·iotdb
看着博客敲代码1 天前
WorkBuddy 接上 Kali MCP 做自动化渗透:信息收集到初步验证的落地记录
linux·人工智能·安全·网络安全·自动化
jack186891 天前
Devin 智能软件工程师实战应用指南
windows