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

git and svn 行尾风格配置强制为lf

git

CLI配置:

// 提交时转换为LF,检出时转换为CRLF
git config --global core.autocrlf true   

// 提交时转换为LF,检出时不转换
git config --global core.autocrlf input   

// 提交检出均不转换
git config --global core.autocrlf false
图形配置:

进入setting, 点git

 .gitconfig 增加如下部分

[core]autocrlf = input

svn

svn:eol-style

  • LF: Set end-of-lines automatically to Unix line endings upon checkout and commit.
  • CRLF: Set end-of-lines automatically to Windows line endings upon checkout and commit.
  • native: This will store line endings upon commit to Unix line endings (LF), but will checkout the line endings with either LF or CRLF based upon the client.

图形配置实例:

win11 :  TortoiseSVN setting

默认有# enable-auto-props = yes,放开#号,并增加对应的你使用的文件配置

enable-auto-props = yes
# Add these for each text file type that you use:
*.txt = svn:eol-style=native
*.cs = svn:eol-style=native
*.xml = svn:eol-style=native
*.c = svn:eol-style=native
*.h = svn:eol-style=native
Makefile = svn:eol-style=native

http://www.lryc.cn/news/223734.html

相关文章:

  • 达梦数据库答案
  • 基于SSM的楼房销售系统设计与实现
  • Blender做一个小凳子学习笔记
  • Maven简介
  • 后端工程化 | SpringBoot 知识点
  • Oracle(15)Managing Users
  • 自动化测试(Java+eclipse)教程
  • ThreadFactory 实例创建方式
  • 【自动化测试】Pytest框架 —— 跳过测试和失败重试
  • python 时间加法 输出t分钟后的时间
  • 51单片机-串口通信
  • JAVA微信端医院3D智能导诊系统源码
  • 考研408-计算机网络 第二章-物理层学习笔记及习题
  • 鸿蒙开发工具的汉化
  • 14:00面试,14:06就出来了,问的问题有点变态。。。。。。
  • 如何使用 NFTScan NFT API 在 zkSync 网络上开发 Web3 应用
  • rust从0开始写项目-读取配置文件
  • Docker的安装以及使用
  • 计算机网络学习笔记(五):运输层(待更新)
  • 阿里云99元服务器40G ESSD Entry云盘、2核2G3M带宽配置
  • 6个机器学习可解释性框架
  • 数据结构——B树
  • java--String
  • ls命令区别
  • 经典OJ题:随机链表的复制
  • HTML的初步学习
  • 小赢科技荣登“2023中国互联网成长型前二十家企业”,旗下小赢卡贷表现突出
  • @Cacheable 、 @CachePut 、@CacheEvict 注解
  • 【ChatGPT】人工智能的下一个前沿
  • chrome 一些详细信息查找的地方