发现项目中有一个文件更改了,而且忘了什么时候因为什么事,谁更改的,这时候需要查看更改日志
某个文件的历史修改
git blame golfMaster/Menu/GMWebViewController.m

会列出这个golfMaster/Menu/目录下GMWebViewController.m 文件的所有修改,修改人和修改时间,
还有一个命令git log --pretty=oneline golfMaster/Menu/GMWebViewController.m 会查看所有关于此文件的commit ,使用 git show 产看某次commit的更改。
网友评论