Have you ever found a bug-inducing line change in your code, and wondered who made the change to that line? ! lets you pick a file and show who last changed every line. If you were wondering, it's called because it lets you assign blame for the code-breaking line you're investigating. Fortunately, git has a command for that git blame git blame To find out who changed a line, simply run the following command where is the file you want to check: myfile.txt git blame myfile.txt If you're interested in the format of , it breaks down like this: git blame ^665221a (Johnny Simpson 2022-04-30 20:58:04 +0100 10) import { v4 as uuid } from 'uuid'; ^ ^ ^ | | | Commit ID | Line number | Author and timestamp Using Git Blame on a Particular Line This is really useful, but what if you want to hone in on a specific line, you can use the option. For example, if you want to see the change history between lines 1 and 5, you would do the following: -L git blame index.js -L 1,5 Or, if you wanted to find the change history between lines 20 and 40, you could do the following: git blame index.js -L 20,40 Other Useful Git Blame Options There are also a bunch of other useful options that you might want to use. Here are some of the ones I use the most, and what they do. git blame Showing an author's email with git blame All you have to do to show the email address of an author only is use the option: -e git blame index.js -e Producing an output like this: ^665221a (<some@email.com> 2022-04-30 20:58:04 +0100 8) import { fileURLToPath } from 'url' Ignoring whitepsace with git blame You can also ignore whitespace with , should your code contain a lot of it. To do this, you can use the option: git blame -w git blame index.js -w Formatting lines with color using git blame By default, produces a wall of white or black text. If you want to differentiate different commits and changes by color, you can use the or : git blame --color-lines --color-by-age colors lines if the line before was a different commit. --color-lines colors lines by their age. --color-by-age Showing file names with git blame To show the filename with , use the option. This will show the file name along with the commit ID. git blame -f git blame index.js -f Will produce an output like this: ^665221a index.js (Johnny Simpson 2022-04-30 20:58:04 +0100 16) import dotenv from 'dotenv' Showing line changes from the bottom up (reversed) with git blame You can also show line changes in reverse with , meaning starting at the bottom, and going up. Just add the option to your command: git blame --reverse git blame index.js --reverse