English 中文(简体)
如何将档案存放在CR-LF线上,以盖特结束?
原标题:How to store files with CR-LF line endings in git?
  • 时间:2012-01-12 10:30:37
  •  标签:
  • git
  • newline

I m 开发的软件将使用仅视窗的汇编器进行汇编。 我想用CR-LF线把我的文件存放在含水层的存放处,以便能够在不把来源改变为Windows风格的情况下对来源进行包装。

My .gitattributes looks:

*.cpp eol=crlf
*.h   eol=crlf

I also already tried core.eol = crlf. But git is still using LF line endings when I do checkouts and commits on Linux.

是否有任何办法用CR-LF来说明对含水层的利用?

问题回答

窗户只有编辑才能用现成的直线结束。 否则,它就会伪造。

你们只需要为汇编者建立工作树的红树的红树 on上汽车。

I just tried this [Linux; git version 2.1.0] And as best as I can see its working with the following settings:

$ cat .gitattributes 
.gitattributes  text
.gitignore  text
*.cpp       text
*.h     text

$ cat ~/.gitconfig 
...
[core]
    autocrlf = false
    safecrlf = true
    eol  = crlf

在这种配置中,git只允许将原始档案输入数据库,并对<代码>git 添加上的现存留下致命错误。

Remove the safecrlf establishing and now git Addworking but now You have an press for lf-files.

现在rm 查询文档和reset-hard 提供原始文档,而不论该笔文件是否被核对为高尔夫或胎盘。

我怀疑:你有already,在LF-files中检查,现在就给他们。

Please try with the above settings on a new repo and let us know if it works.





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签