Git使用技巧与 git rebase 命令详解
1. 在命令行使用 git blame
当使用Git GUI程序运行 git blame 遇到问题时,可以采用命令行的方式。在命令行中输入以下命令:
git blame math.sh
执行该命令后,会得到类似下面的输出:
256d4027 (Rick Umali 2014-08-05 18:54:56 -0500 1) # Add a and b
2732d6a3 (Rick Umali 2014-08-02 16:54:56 -0500 2) a=1
3847b0be (Rick Umali 2014-08-02 17:54:56 -0500 3) b=1
256d4027 (Rick Umali 2014-08-05 18:54:56 -0500 4) let c=$a+$b
6f6af168 (Rick Umali 2014-08-06 05:54:56 -0500 5) printf "This is the
answer: %d
由于源文件通常较长,可将 git blame 的输出保存到文件中,命令如下:
git --no-pager blame math.sh > math-annotate
这里的 >
超级会员免费看
订阅专栏 解锁全文
1140

被折叠的 条评论
为什么被折叠?



