【发布时间】:2015-03-24 14:28:14
【问题描述】:
我检查了一个分支foo,现在我想切换到分支bar。
error: Your local changes to the following files would be overwritten by checkout:
<300 files follow>
某人在foo 上有一个.gitattributes 文件,其中包括
text=auto
所有“更改”都是换行符。
我可以删除文件,切换分支,然后重新添加。
rm .gitattributes
git checkout bar
git checkout .gitattributes
这是最好(最快/最少打字)的方式吗?
编辑:要清楚,我只想切换分支。我只是在阅读回购。除了工作树之外,我不想更改任何内容。但我做不到。
【问题讨论】:
-
存储,然后使用 -Xignore-eol 或其他任何方式应用更改?
标签: git gitattributes