1

在过去的几年里,我使用SourceTree作为 git 客户端。昨天我尝试了Github Desktop的最后一个版本(版本 Infinite Lop (214))。它比我之前尝试过的所有其他版本都好。仍然不比 SourceTree 好,但无论如何我喜欢它 :) 我决定暂时使用 SourceTree 而不是。

但是今天我打开另一个项目,我对一些文件状态感到惊讶。它表明有 90 多个未提交的更改:

在此处输入图像描述

但实际上我只更改了几个文件。它是如何发生的。可以肯定的是,我在终端中签入了相同的项目:

=> git status

但令人惊讶的是,它在 OSX 的 git 版本上也显示了相同的结果:

On branch SomeBranchNameOfProject
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Podfile
    typechange: Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h
    typechange: Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h
    typechange: Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h
    typechange: Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h
    typechange: Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h
    typechange: Pods/Headers/Public/AFNetworking/AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h
    typechange: Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h
    typechange: Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h
    typechange: Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h
    typechange: Pods/Headers/Public/AFNetworking/AFURLSessionManager.h
    typechange: Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h
    typechange: Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h
    typechange: Pods/Headers/Public/BPXLUUIDHandler/BPXLUUIDHandler.h
    typechange: Pods/Headers/Public/CocoaLumberjack/CocoaLumberjack.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDASLLogCapture.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDASLLogger.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDAbstractDatabaseLogger.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDAssertMacros.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDContextFilterLogFormatter.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDDispatchQueueLogFormatter.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDFileLogger.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDLegacyMacros.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDLog+LOGV.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDLog.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDLogMacros.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDMultiFormatter.h
    typechange: Pods/Headers/Public/CocoaLumberjack/DDTTYLogger.h
    typechange: Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h
    typechange: Pods/Headers/Public/MMDrawerController/MMDrawerBarButtonItem.h
    typechange: Pods/Headers/Public/MMDrawerController/MMDrawerController+Subclass.h
    typechange: Pods/Headers/Public/MMDrawerController/MMDrawerController.h
    typechange: Pods/Headers/Public/MMDrawerController/MMDrawerVisualState.h
    typechange: Pods/Headers/Public/MMDrawerController/UIViewController+MMDrawerController.h
    typechange: Pods/Headers/Public/Mantle/MTLJSONAdapter.h
    typechange: Pods/Headers/Public/Mantle/MTLModel+NSCoding.h
    typechange: Pods/Headers/Public/Mantle/MTLModel.h
    typechange: Pods/Headers/Public/Mantle/MTLReflection.h
    typechange: Pods/Headers/Public/Mantle/MTLTransformerErrorHandling.h
    typechange: Pods/Headers/Public/Mantle/MTLValueTransformer.h
    typechange: Pods/Headers/Public/Mantle/Mantle.h
    typechange: Pods/Headers/Public/Mantle/NSArray+MTLManipulationAdditions.h
    typechange: Pods/Headers/Public/Mantle/NSDictionary+MTLJSONKeyPath.h
    typechange: Pods/Headers/Public/Mantle/NSDictionary+MTLManipulationAdditions.h
    typechange: Pods/Headers/Public/Mantle/NSDictionary+MTLMappingAdditions.h
    typechange: Pods/Headers/Public/Mantle/NSError+MTLModelException.h
    typechange: Pods/Headers/Public/Mantle/NSObject+MTLComparisonAdditions.h
    typechange: Pods/Headers/Public/Mantle/NSValueTransformer+MTLInversionAdditions.h
    typechange: Pods/Headers/Public/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h
    typechange: Pods/Headers/Public/Reachability/Reachability.h
    typechange: Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h
    typechange: Pods/Headers/Public/SDWebImage/SDImageCache.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageCompat.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageManager.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImageOperation.h
    typechange: Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h
    typechange: Pods/Headers/Public/SDWebImage/UIButton+WebCache.h
    typechange: Pods/Headers/Public/SDWebImage/UIImage+GIF.h
    typechange: Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h
    typechange: Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h
    typechange: Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h
    typechange: Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h

事实上,SourceTree 并没有显示带有“Changes not staged for commit”警告的文件!

我知道源代码树使用自己的嵌入式 Git,我可以在首选项中更改它:

在此处输入图像描述

这意味着,SourceTree 也可能显示相同的“未暂存文件”......

我的问题是,我如何使用与使用 SourceTree 相同的体验的 Github Desktop?我的 CocoaPods 文件出了什么问题。或者,如果我理解有误,请指导我解决此问题。

4

1 回答 1

0

问完我的问题后,我更新了OSXtoversion 10.11.1 (15B42)XCodeto Version 7.1 (7B91b)。但事情变得更糟 XCode 开始显示工作区中所有文件的问号(意味着:源代码控制未跟踪的文件)。那一刻,我意识到我的工作区中的.git 目录有问题。我打开终端并进入 .git 目录。我从我的备份目录中检查了我的项目的旧副本(如果你有备份,你很幸运......)。这与以前不同。我知道 SourceTree 正在sourcetreeconfig我的 .git 目录中添加目录,而且不止于此。我了解Github Desktop添加目录和每个人(所有客户端)都会相互影响,除了可爱的甜蜜 SourceTree!我想说谢谢你们的团队和Atlassian

解决方案:我删除了从 Github Desktop 创建的其他目录,现在一切都像魅力一样工作。

所以我在 Github Desktop 上的广告现在暂停了。但几天后我会再试一次,但这次只使用 Github Desktop。为什么?因为我喜欢 :)

感谢您的评论@torek。

于 2015-10-23T13:46:48.610 回答