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

中企动力科技股份有限公司网站网站导航用什么字体

中企动力科技股份有限公司网站,网站导航用什么字体,手机ppt制作软件免费app,室内设计方案介绍0 Preface/Foreword 0.1 基本概念 Git版本管控工具功能强大#xff0c;在使用过程中#xff0c;在多人合作的项目开发过程中#xff0c;经常会遇到提交代码时出现的warning提醒#xff0c;尤其是换行符。 Linux/Unix/Mac OS操作系统的换行符使用LF符号#xff08;\n在使用过程中在多人合作的项目开发过程中经常会遇到提交代码时出现的warning提醒尤其是换行符。 Linux/Unix/Mac OS操作系统的换行符使用LF符号\n而Windows使用CR\rLF\n作为换行符。 CRCarriage Return回车ASCII码0x0DCtrl为 ^M LFLine Feed换行ASCII码0x0ACtrl为^J 影响换行符的几个因素 操作系统平台编辑器尤其是Windows平台下的编辑器core.autocrlf 变量设置 true, false, input core.autocrlf不同值的作用 true最终提交到代码库中时所有文件都认为是text把所有CRLF转成LF。checkout时全都转为CRLFgit add的过程中会强制将LF转成CRLF; git commit时强制将CRLF 转成LF推荐在Windows中使用适合多平台协作false最终提交到代码库中时保持原来text内容。CRLF还是CRLFLF还是LF。适合纯Windowsinput最终提交到代码库中时所有CRLF转成LF。checkout时保持LF或者CRLF不转换。推荐在Linux/Unix下使用适合纯Linux/Mac OS core.safecrlf不同值的作用 true若有mixed line endings无法提交fatal错误false允许提交包含混合line endings的文件warn只是警告仍然可以提交 core.eol的值类型当且仅当core.autocrlf为false时core.eol设置才有效 lfcrlfnative根据平台自动转换 Git版本管控的几个区域 工作区 working directory检出git  checkout branch到对应的分支暂存区stage/index通过git add 添加修改过的文件git add的动作就是将文件修改放入到了暂存区本地版本库commit history, 通过git commit动作提交成功后对应的文件会放入版本库中远程版本库通过git push动作将本地版本库更新到远程库 0.2 git 变量查看和设置 0.2.1 查看autocrlf git config core.autocrlf  0.2.2 查看safecrlf git config core.safecrlf 0.2.3 查看eol git config core.eol 1 Usage 使用方法可参考文章 Configuring Git to handle line endings - GitHub Docs [转载]通过阅读 git-config 文档理解 Git 如何使用autocrlf、safecrlf、eol和.gitattributes处理line-ending - 简书 Git提示“warning: LF will be replaced by CRLF”最详细解释解决方案-CSDN博客 git如何避免”warning: LF will be replaced by CRLF“提示 - 知乎 https://docs.github.com/zh/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platformwindows .gitattributes 作用详细讲解git大佬必会技能) - 代码先锋网 1.1 Warning warning: LF will be replaced by CRLF in xxx file  The file will have its origninal line endings in your working directory. 1.2 添加.gitattributes文件 .gitattributes中的内容会覆盖 core.autocrlf的设置大多数情况下使用配置文件来设置不同文件的line endings。 除了用命令行设置core.autocrlf还可以用.gitattributes文件管理Git读取特定存储中的行结束符的方式。该文件提交到存储库时它将覆盖所有存储库贡献者的core.autocrlf设置。可以确保所有用户的行为一致而不管其他Git设置和环境如何。 # Set the default behavior, in case people dont have core.autocrlf set. * textauto #文件的行尾自动转换。如果是文本文件文件入Git库时行尾自动转为LF。若在库中的文件行尾是CRLF则文件在入库时不再转为LF。# Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. *.c text *.h text #对于txt文件标记为文本文件并进行行尾规范化。# Declare files that will always have CRLF line endings on checkout *.uvprojx text eollf #对于.uvprojx标记为文本文件在文件入库时进行规范化行尾转成LF检出是也保持LF。#Explicitly declare files you want to always be normalized and converted # to LF line endings on checkout *.py eollf #对于py文件只针对工作目录中的文件行尾设置为LF#Denote all files that are truly binary and should not be modified.*.bin binary *.jpg binary #对于.bin 和 .jpg文件表示二级制文件检出是不修改 NOTE可以发现文件是匹配的用*.c、*.uvprojx、*.bin用空格分隔然后给定一个设置即为text、text eoflf、binary。 textauto Git将以其认为的最佳方式处理文件。这是一个合适的默认选项。在检出时 text eollf Git将始终把行结束符转换为LF该场景用于必须保持LF结束符的文件即使在Windows上。在检出时text eolcrlf Git将始终把行结束符转换为CRLF该场景用于必须保持CRLF结束符文件即使在Linux或OSX上。binary Git会理解指定文件不是文本并且不应尝试更改该文件。该binary设置也是-text -diff的别名 更改行结束符后刷新仓库注意事项如下 当.gitattributes文件已经提交到代码库中时为了让该文件可以在所有开发者本地工作路径都能生效可以根据以下动作进行 在本地拉取最新代码git pullgit rm --cached -rfgit reset --hard HEAD 1.2.1 .gitattributes介绍 .gitattributes是一个文本文件文件中的一行定义一个路径的若干个属性主要目的是用来定义每种文件的属性方便git帮助统一管理。 .gitattributes文件格式 需要匹配的文件模式 属性1 属性2 ...  在该文件每一行中一个属性以text为例 可能有4种状态 设置  text不设置 -text设置值 textauto未声明通常不出现该属性即可但是为了覆盖其他文件中的声明也可以用 !text .gitattributes中可以定义的属性包括持续更新中 text用于控制line endings的规范性。如果一个文本文件是规范的则Git库汇总该文件Git服务器中的文件的行尾总是LF。eol设置行尾字符eollf入库时将行尾规范为LF检出时行尾为LF eolcrlf入库时行尾规范为LF检出时将行尾设置为CRLFdiff告诉git声明文件需要比较版本差异binary二进制文件merge合并策略 diff属性 diff状态描述如下 diff 强制视为文本文件即使包含一些通常从不出现在文本文件的字节值比如NULL!diff 表示为非文本文件未定义 1.2.2 .gitattributes生效顺序 生效顺序如下 项目中有多个.gitattributes文件情况远离根目录的文件优先级越高生效。同一个.gitattributes文件情况遵循覆盖原则后面的行会覆盖前面的设置如果一个文件的某个属性被多次设置则后设置的优先。 1.2.3 text 和eol的区别 参考文献git - What does !eol in gitattributes do? - Stack Overflow Git有两个属性处理行尾。Git has 2 attributes that deal with end-of-lines Text Documentation says: This attribute enables and controls end-of-line normalization.When a text file is normalized, its line endings are converted to LF in the repository. This effectively means that when you commit to the repo, it will convert line-endings to LF. eol Documentation says: This attribute sets a specific line-endings style to be used in the working directory. It enables end-of-line normalization without any content checks, effectively setting the text attribute. So while the text attribute affects how the file will look like IN THE REPO, eol affects how the file looks like in the working directory. An attribute can have 4 states: textset with no value-textunsettextautoset with specific value, this setting means you let Git decide if a file is text and if it is it will normalize it (set line-endings in the repo to LF)!textunspecified !eol !eof means that the attribute eol is set to unspecified explicitly, in this case it is the same as not specifying it at all, instructing Git to look at the core.autocrlf and core.eol configuration settings to see how to deal with line-endings in the working directory. Note this : The core.eol configuration variable controls which line endings Git will use for normalized files in your working directory; the default is to use the native line ending for your platform, or CRLF is core.autocrlf is set. 1.3 常用template(.gitattributes) # Help git with file types * textauto *.o binary *.obj binary *.bin binary *.lib binary *.mbn  binary *.svf binary # Always use LF EOL on shell script files, otherwise Docker cannot run scripts # in a folder mapped from Windows into the Docker container. *.sh    eollf # Documentation files are often changed in multiple concurrent branches. # Use git union strategy when merging, so it keeps both sides modifications # without conflicts. README.md       mergeunion CHANGELOG.md    mergeunion RELEASENOTES.md mergeunion   1.4 格式统一转换工具 unix2dos dos2unix 在Windows平台可以用unix2dos工具将指定文件的line endings转换成适合Windows平台的CRLF。 反之亦然可以用dos2unix工具将指定文件的line endings转成适合Linux/unix平台的LF。 查看工具版本 1.5 查看文本文件的换行符  1.5.1 Linux系统中Vim 用VIM编辑文本保存后字符总数比实际字符多一个这是为什么 因为VIM等工具会默认在文件末尾添加一个换行符\n不管当前需不需要换行。  查看字符数量工具wc 常用选项 -c 统计字节个数-m统计字符个数-l统计换行符个数  1.5.2 hexdump工具 hexdump工具可以用来查看文件中所有字符内容包括invisible character。 hexdump -c file_name 可以发现3.txt文件末尾有一个换行符0a显示出来就是一个黑点。  1.5.3 裁剪文件工具truncate truncate工具 可以用来将裁剪文件大小。 1.5.4 查看文件类型file 利用file命令也可初步得知文本是否包含换行符及换行符的类型。 1.5.5 文件属性  NOTE如果文件文件已经包含了换行CRLF或者LF不管是在windows下还是Linux进行编辑换行符都会与原始值保持一致编辑器自动识别功能。 1.5.6 Notepad设置eol格式 Edit EOL conversion 1. 5.7 cat -e 1.5.8 od -c
http://www.w-s-a.com/news/702050/

相关文章:

  • 做风帆网站需要多少钱越野车网站模板
  • 如何做网站平台销售用狗做头像的网站
  • 宝安电子厂做网站美食网页设计的制作过程
  • 网站logo提交学网站开发技术
  • 跨境电商平台网站建设广州西安官网seo推广
  • 我和你99谁做的网站小程序制作第三方平台
  • 建设银行网站用户名鹤岗网站seo
  • 做一元夺宝网站需要什么条件西安市做网站的公司
  • 零基础建设网站教程郑州做网站推广价格
  • 平面设计免费素材网站新开三端互通传奇网站
  • ppt模板免费下载 素材医疗seo网站优化推广怎么样
  • 课程网站怎么做wordpress文章改背景色
  • 网络营销从网站建设开始卖汽车配件怎么做网站
  • 手机商城网站制作公司济南想建设网站
  • .net 建网站网站网站做员工犯法吗
  • 电子商务网站建设说课稿棕色网站设计
  • 怎么做律所的官方网站红塔网站制作
  • 装一网装修平台官网惠州seo按天付费
  • 湖南建设监理报名网站东莞模块网站建设方案
  • 网站建设小组个人主页html源码
  • 响应式网站检测工具营销公司业务范围
  • 网站源码如何安装做游戏课程网站
  • 选服务好的网站建设亚洲砖码砖专区2022
  • 网站快速查找wordpress 悬停 图片 文字
  • 网站续费 多久想自己做网站该学些什么
  • 可以自己做网站wordpress英文写作插件
  • 国外可以做会员网站的网站怎么查百度竞价关键词价格
  • 新站网站建设亚马逊关键词
  • 电商网站前端架构设计上海市建设工程安全生产协会网站
  • 东莞企业免费模版网站建设一般网站维护要多久