我现在遇到了一个存储库问题,虽然我的git-fu通常很好,但我似乎无法解决这个问题.
当我克隆这个存储库,然后cd进入repo时,git-status会显示几个已更改的文件.注意:我没有在任何编辑器或任何东西中打开回购.
我尝试按照本指南:http://help.github.com/dealing-with-lineendings/但这对我的问题没有任何帮助.
我尝试了cd很多次,但似乎没有做任何事情.
任何帮助/想法将不胜感激
更新1:我在Mac上,并且repo本身没有子模块.
更新2:文件系统是mac上的"Journaled HFS +"文件系统,不区分大小写.这些文件是一行的,每个大约79K(是的,你听到了),所以看看git status并不是特别有用.我听说过git checkout -- .这可能会有所帮助,当我回到计算机上时,我会尝试使用它.
更新3:用事实更改文件系统的细节!而且,我尝试了git diff一些效果不佳的技巧.
我从其他人那里收到了git checkout,并尝试将未分级的更改提交到本地存储库.但是,即使内容完全相同,很多(如果不是每个)文件也会显示为已修改.
我已经设置core.fileMode为false并且设置core.autocrlf为false,但没有成功.
值得一提的是,我收到的Git repo来自使用Windows的人,而我使用的是Linux.
如何进行实际更改?
编辑:输出git config -l:
user.name=Aron Rotteveel
user.email=<removed>
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=auto
color.ui=true
color.pager=true
color.branch.current=yellow reverse
color.branch.local=yellow
color.branch.remote=green
color.diff.meta=yellow bold
color.diff.frag=magenta bold
color.diff.old=red bold
color.diff.new=green bold
color.status.added=yellow
color.status.changed=green
color.status.untracked=cyan
core.pager=less -FRSX
core.whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
alias.co=checkout
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
core.autocrlf=false
remote.origin.url=<removed>
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
Run Code Online (Sandbox Code Playgroud)
更新:添加了一些随机示例文件.这些文件只是纯文本,因此最容易包含.
原始文件位于:https://gist.github.com/c3c5302430935155ef3d.Hexdumps肯定表明文件不同,但我不知道是什么导致这个,以及如何解决它.
HEAD版本:
0000000: 4854 4d4c 2e53 6166 654f 626a 6563 740d HTML.SafeObject.
0000010: 0a54 5950 453a …Run Code Online (Sandbox Code Playgroud) 所以,我对发生了什么感到困惑.我从来没有攻击过linux内核,所以也许这很常见.如果是这样的话,抱歉新问题.
$ git clone https://github.com/torvalds/linux.git
Run Code Online (Sandbox Code Playgroud)
然后,
$ git status
Run Code Online (Sandbox Code Playgroud)
.
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: include/linux/netfilter/xt_CONNMARK.h
# modified: include/linux/netfilter/xt_DSCP.h
# modified: include/linux/netfilter/xt_MARK.h
# modified: include/linux/netfilter/xt_RATEEST.h
# modified: include/linux/netfilter/xt_TCPMSS.h
# modified: include/linux/netfilter_ipv4/ipt_ECN.h
# modified: include/linux/netfilter_ipv4/ipt_TTL.h
# modified: include/linux/netfilter_ipv6/ip6t_HL.h
# modified: net/ipv4/netfilter/ipt_ECN.c
# modified: net/netfilter/xt_DSCP.c
# modified: net/netfilter/xt_HL.c
# modified: net/netfilter/xt_RATEEST.c …Run Code Online (Sandbox Code Playgroud)