简体   繁体   English

如何忽略SourceTree(Git)中的不可忽略文件

[英]How can I ignore non ignorable file in SourceTree (Git)

I'm working with a BitBucket repository using SourceTree. 我正在使用SourceTree处理BitBucket存储库。 The issue is that there's a file that apparently has changes. 问题是,有一个文件显然已更改。 But it hasn't . 但是事实并非如此 I try to ignore the changes via Right click, Discard but it only changes the file name from File.php to file.php and viceversa (after ignore changes again). 我尝试通过Right click, Discard来忽略更改Right click, Discard但是它仅将文件名从File.phpfile.php ,反之亦然(在再次忽略更改之后)。 In my server that file is different from both in my local environment. 在我的服务器中,该文件与本地环境中的文件都不相同。

I just want to "clean" my SourceTree from annoying files, without affect my remote file. 我只想从烦人的文件中“清除”我的SourceTree,而不会影响我的远程文件。

I know the Git basics, but I'm not a real expert on it, so, I don't want to run the first command I find. 我知道Git的基础知识,但我并不是真正的专家,因此,我不想运行找到的第一个命令。

屏幕截图

@torek thank you so much. @torek非常感谢。 That link opened my eyes. 那联系打开了我的眼睛。 A partner created 2 files file.php and File.php with linux, so he didn't have trouble pushing them to the repository. 一个合作伙伴使用linux创建了2个文件file.phpFile.php ,因此他将它们推送到存储库没有困难。 Now, when I pulled those changes I couldn't have both files. 现在,当我撤消那些更改时,我无法同时拥有两个文件。 And because they were different from each other SourceTree always told me that there were changes. 因为它们彼此不同,所以SourceTree总是告诉我发生了变化。 I hope this can help other people too. 我希望这也可以帮助其他人。 Thank you once again. 再一次感谢你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM