【问题标题】:Easiest Way to Compare 2 Xcode Projects Using Git [duplicate]使用 Git 比较 2 个 Xcode 项目的最简单方法 [重复]
【发布时间】:2018-07-21 13:45:57
【问题描述】:

在某个时间点,我的项目完美运行并提交了。几天后发生了变化,突然停止工作。 如何使用 git 比较提交之间的更改?

谢谢!

【问题讨论】:

  • 使用git bisect:metaltoad.com/blog/…
  • 基本上,您可以筛选您的历史记录并将其缩小到引入错误的确切提交。

标签: xcode git


【解决方案1】:
  1. 发送git log 并找到您认为项目运行良好的大致日期。
  2. 查找该日期前后提交的 SHA 并通过以下操作找到它们的差异:

    git diff <SHA of commit1> <SHA of commit2>
    
  3. 要比较特定 filename 的变化,请执行以下操作:

    git diff <SHA of commit1> <SHA of commit2> /path/to/filename/in/repo
    

【讨论】:

    猜你喜欢
    • 2012-02-15
    • 2013-10-09
    • 1970-01-01
    • 2020-12-14
    • 1970-01-01
    • 2011-07-11
    • 2011-03-13
    • 1970-01-01
    • 2011-03-15
    相关资源
    最近更新 更多