Git命令行和Xcode结合使用(我来告诉你这行代码谁写的)
但是发现在Terminal查看文件修改的内容并不是很方便,后来就结合Xcode本身已经集成Git相关功能的界面,来轻松的查看代码的修改信息。下面举几个例子来和大家一块学习。
用法一
Source Control --> History... --> 历史修改信息(界面见下图) --> 选择想要查看的某次修改(Show modified files) --> 被修改的代码一目了然




用法二
看到某块代码突然想看修改记录和代码修改人(好比一段很牛掰"垃圾"的代码,想知道谁写的) 右键 --> Show Blame for Line --> Open in Blame / Open in Comparison --> 效果如下



用法三
View --> Version Editor --> Show Log View ///等其他,下图所示

Super