在Eclipse中克隆后立即进行不间断的更改 [英] Unstaged changes immediately after cloning in Eclipse

查看:194
本文介绍了在Eclipse中克隆后立即进行不间断的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Atlassian Stash和Eclipse Kepler的Git插件,我正在尝试克隆一个存储库。一旦我完成它,我立即结束了N个不变的变化,其中N每次尝试都不一样。当我尝试比较两个明显不同的文件时,没有一个变化。我猜测文件的元数据可能会有一些差异,但是由于我找不到什么改变了,我也不想提交/推送文件。像我说的那样,改变的文件数量是完全随机的,而且被修改的文件种类也很随机。 (.project,.java,.groovy,+ more)。

I'm using Atlassian Stash, and the Git plugin for Eclipse Kepler, and I'm trying to clone a repository. As soon as I complete it, I immediately end up with N unstaged changes, where N vary everytime I try it. When I try and compare the two files that are apparently different, there isn't a single change. I'm guessing there may be some differences between the metadata of the files, but since I can't find what exactly has changed I don't want to commit/push the files either. Like I said, the number of files that have changed are completely random, and the kind of files that have been changed are also pretty random. (.project, .java, .groovy, +more).

我已经看过这个问题这个问题,但是没有一个解决了我的问题。

I have had a look at this question, this question, and this question but none of them solved my question.

任何想法,为什么

推荐答案

像评论中已经提到的,这是一个线条的问题。

Like already mentioned in the comments,this is a line-ending problem.

我也有一天有这个问题。

I also had this issue one day.

您正在使用的git插件(egit)具有问题 .gitattributes 在哪里可以配置行尾应该如何处理。
- 如果您正在使用该插件并且仍然希望使用该插件,则需要首先修复行尾,而不要在IDE中配置线结尾以使用Unix-Line-Endings,以及在其他(通常是Windows)机器。这将解决新文件的行结束问题。

The git plugin(egit) you are using does have a issue with .gitattributes where you can configure how line endings should handled. - If you are using the plugin and still want to use it, you need to have to fix the line endings first and than configure your line endings in your IDE to use Unix-Line-Endings, as well as on the other(usually Windows) machine. This will solve the line ending problem for new files.

我完全反对git应该处理你的行 - 作为开发人员,您将负责管理此问题。所以让你的IDE处理这个问题,并按照已经提到的方式进行配置。

I am totally against the fact that git should handle your line-endings, you as a developer are responsible for managing this. So let your IDE handle this issue and configure it as already mentioned.

这篇关于在Eclipse中克隆后立即进行不间断的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆