当前位置: 首页 > web >正文

Git的windows开发与linux开发配置

Git的基本配置

安装

  • linux可以使用包管理器安装
  • windows可以使用
    • mingw的git:https://git-scm.com/downloads
    • TortoiseGit:https://tortoisegit.org/download/

配置

  1. 分为系统配置–system、全局配置–global、项目配置–local
    配置名称和邮箱
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
  1. 配置跨平台换行符
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时的编码
# 中文编码支持
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协议
设置口令缓存:
git config --global credential.helper store
添加 HTTPS 证书信任 :
git config http.sslverify false

ssh协议:

http://www.xdnf.cn/news/7736.html

相关文章:

  • Dify快速上手 MCP,接入高德地图 Server 实战攻略
  • 香港科技大学物理学理学(科学计算与先进材料物理与技术)硕士招生宣讲会——深圳大学
  • 制作一款打飞机游戏52:子弹模式
  • C++显式声明explicit
  • 1G(第一代移动通信系统)详解
  • python 提交 命令到远程windows服务器并获取作业进程id
  • ABAP - SAP与企业微信集成-推送文件到企业微信
  • DeepSeek提示工程Prompt Engineering
  • multipart/* 响应是否必须使用 chunked 编码?
  • 常用UI自动化测试框架
  • 【Python训练营打卡】day31 @浙大疏锦行
  • 本征半导体与杂质半导体
  • Ubuntu操作系统里面安装Docker Compose
  • Python实战:打造一个功能完整的单位转换器(长度/温度/货币)
  • C++开发基础之理解std::condition_variable中的wait与wait_for的区别与使用场景
  • 基于springboot的个人博客系统【附源码】
  • 《苍穹外卖》SpringBoot后端开发项目核心知识点与技术栈整理(DAY10 to DAY12)
  • 【深度学习:理论篇】--一文理解Transformer
  • 若依项目集成sentinel、seata和shardingSphere
  • Day.js 基础用法全方位详解
  • 鸿蒙NEXT开发动画案例12
  • AI作曲革新:ACE-Step如何推动音乐创作走向大众
  • UE(虚幻)学习(六)插件打包在UE5.3.2下Value cannot be null的错误
  • Ubuntu 安装 Node.js 指定版本指南
  • 01-通过纯js理解数据驱动图表概念
  • window 显示驱动开发-GDI 硬件加速
  • 活到老学到老-Spring参数校验注解Validated /Valid
  • 实战:基于Pangolin Scrape API,如何高效稳定采集亚马逊BSR数据并破解反爬虫?
  • Nuxt.js一个基于 Vue.js 的通用应用框架
  • 使用引用的原因 和 运算符重载的必要性