This is an old revision of the document!


Most useful variations of git blame, using examples from Linux kernel source.

Show the (most recent) origin of each line in a file:

$ git blame Makefile
b24413180f560 (Greg Kroah-Hartman       2017-11-01 15:07:57 +0100    1) # SPDX-License-Identifier: GPL-2.0
c517d838eb7d0 (Linus Torvalds           2015-02-22 18:21:14 -0800    2) VERSION = 4
60cc43fc88842 (Linus Torvalds           2018-04-15 18:24:20 -0700    3) PATCHLEVEL = 17
55922c9d1b84b (Linus Torvalds           2011-05-29 17:43:36 -0700    4) SUBLEVEL = 0
67b8d5c708122 (Linus Torvalds           2018-05-13 16:15:17 -0700    5) EXTRAVERSION = -rc5
75bc37fefc447 (Linus Torvalds           2018-05-06 16:57:38 -1000    6) NAME = Merciless Moray
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    7) 
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    8) # *DOCUMENTATION*
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    9) # To see a list of typical targets execute "make help"
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   10) # More info can be located in ./README
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   11) # Comments in this file are targeted only to the developer, do not
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   12) # expect to learn how to build the kernel reading this file.
^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   13) 
... snip ...
  • git_blame.1526896021.txt.gz
  • Last modified: 2018/05/21 09:47
  • by rpjday