[英]git bisect in combination with CRLF/LF
I am trying to git bisect
some bad behavior in a public repo. 我试图将公共
git bisect
一些不良行为git bisect
部分。
The repo has: 回购包括:
.gitattributes
file in its root, normalizing .c, .h, and .java files .gitattributes
文件 ,规范化.c,.h和.java文件 As I understand it, none of the present .git/config
or ~/.gitconfig
should matter, as .gitattributes
has precedence. 据我了解,目前的
.git/config
或~/.gitconfig
都不重要,因为.gitattributes
具有优先权。
My problem relates to this: when I do a checkout of a commit with CRLF, the local files are modified with LF. 我的问题与此有关:当我使用CRLF检查提交时,使用LF修改本地文件。 These files show up as modified upon
git status
. 这些文件在
git status
显示为已修改。 Then if I try to check out another commit, git refuses in order to protect my local changes. 然后,如果我尝试检查另一个提交,git拒绝以保护我的本地更改。 Fine.
精细。
In the checkout
case, I can force it with -f
, and go on. 在
checkout
情况下,我可以用-f
强制它,然后继续。
The problem is that I cannot seem to force git bisect skip
. 问题是我似乎无法强制
git bisect skip
。 If I try, git
tells me to stash changes. 如果我尝试,
git
告诉我存储更改。 I cannot get clean working files (stashing leaves me with modified newlines anyway), and I cannot skip. 我无法获得干净的工作文件(无论如何都会让我留下修改过的新行),我无法跳过。
I've tried copying over a temporary .gitattributes
in order to make bisect
leave the newlines unchanged, but then it complains about the changes in .gitattributes
being unsaved. 我已经尝试复制一个临时的
.gitattributes
以使bisect
保持新行保持不变,但随后它抱怨.gitattributes
中的更改未保存。
Is there a way to force bisect
? 有没有办法强制
bisect
?
none of the present .git/config or ~/.gitconfig should matter, as .gitattributes has precedence
目前.git / config或〜/ .gitconfig都不重要,因为.gitattributes具有优先权
not really, the local file for gitattributes is .git/info/attributes
, and it has precedence over whatever .gitattributes
file in repository 实际上,gitattributes的本地文件是
.git/info/attributes
,它优先于存储库中的任何.gitattributes
文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.