Questions tagged [git-blame]

git-blame is a git command that shows what revision and author last modified each line of a file.

git-blame is a git command that shows what revision and author last modified each line of a file.

https://www.kernel.org/pub/software/scm/git/docs/git-blame.html

git annotate is almost an alias for git blame (the output format is slightly different).

115 questions
484
votes
6 answers

What does 'git blame' do?

I saw a lot of questions about methods of using git blame, but I don't really understand them. I see a Blame button on top of files on the GitHub interface. Upon clicking it, it shows some diff with usernames on the left bar. What does that…
Himanshu Mishra
  • 8,510
  • 12
  • 37
  • 74
76
votes
5 answers

Where is git-blame in SourceTree

I'd like to see who contributed which line/change to a file. git-blame does exactly that. So does SourceTree have a git-blame view?
wnrph
  • 3,293
  • 4
  • 26
  • 38
57
votes
7 answers

How to Git Blame/Authors a previous revision with Xcode 11?

With Xcode 10.2, I could select the "Authors" view, then select a previous git revision to blame from the bottom picker: But with Xcode 11 beta, when I select the "Authors" view, I'm unable to select a past revision to blame because the picker is…
Cœur
  • 37,241
  • 25
  • 195
  • 267
52
votes
2 answers

Why git blame does not follow renames?

$ pwd /data/mdi2/classes $ git blame -L22,+1 -- utils.js 99b7a802 mdi2/utils.js (user 2015-03-26 21:54:57 +0200 22) #comment $ git blame -L22,+1 99b7a802^ -- utils.js fatal: no such path mdi2/classes/utils.js in 99b7a802^ As you have noticed,…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
40
votes
3 answers

How to get to know about developer code blame in android studio

I am working on project which is shared by few developers, how to get to know about developer blame in android studio?? any shortcuts or any idea? which will help us to know about code blame.
Vinod Pattanshetti
  • 2,465
  • 3
  • 22
  • 36
34
votes
1 answer

Has Bitbucket the git-blame on a line feature similiar to GitHub?

Can I view the of a file/ a line who committed what and when on bitbucket? Can't find these functions on the site. Thank you!
nunuh89
  • 543
  • 1
  • 5
  • 11
31
votes
2 answers

Git commit that doesn't override original authors in git blame

I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces. $ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \ I can commit this change with git commit, but it will mark me as the author of…
nookni
  • 313
  • 3
  • 6
29
votes
5 answers

How do I disable username annotations in PyCharm

I'm not sure if it was an update or I enabled a setting but I am seeing my code annotated with git blame usernames inline with the code. The git blame action says it is turned off. When I click on the username the column with the line numbers…
Shawn Northrop
  • 5,826
  • 6
  • 42
  • 80
25
votes
2 answers

git blame with optional ignorerevsfile

I have about 40 git repositories, most of which have a .git-blame-ignore-revs file for using with git blame. So, instead of locally configuring each of them with blame.ignorerevsfile=.git-blame-ignore-revs, I applied it to my global git…
anol
  • 8,264
  • 3
  • 34
  • 78
25
votes
3 answers

git blame on windows reports "fatal: no such path in HEAD"

When I run git blame on a file in a folder e,g,: git blame Foo/FileA.txt it returns fatal: no such path 'Foo/FileA.txt' in HEAD I can clearly see that this file exists on the file system, and other files in the same folder can be successfully blamed…
James World
  • 29,019
  • 9
  • 86
  • 120
24
votes
2 answers

Find all current lines modified by an author

How would I in git determine all lines still in existence that were from a specific author. Say for example, a Tony had worked on my project and I wanted to find all lines in my develop branch that still exists and were from a commit that Tony…
stevebot
  • 23,275
  • 29
  • 119
  • 181
20
votes
1 answer

Combine `cloc` with `git blame`

cloc enables one to count the number of lines of code stored in a directory per language per type (blank, comment, or code). git blame enables one to see which part of a file belong to whom. I'm looking for a way to combine both so that one gets a…
Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
16
votes
3 answers

IntelliJ annotate vs git blame

I am using IntelliJ's annotate feature to see in the editor who last changed a line in a file. Now I am using JGit to read the same annotations and they differ. For me it seems that Intellij checks that a line has not been changed between commits…
15
votes
2 answers

Check git history for a range of lines in VSCode

Is it possible in VSCode to show git history for a range of line ? Let's say I have 1000 commits concerning this file, and a range of line in this file had its last change on commit 24, I have to check 976 commits in the editor. I saw something…
Benjamin Barrois
  • 2,566
  • 13
  • 30
14
votes
3 answers

tig blame view: How to come back (child commit) after loading parent commit

In a blame view, I use ',' to load blame for the parent commit. How to come back to the child?
Dilip M
  • 141
  • 5
1
2 3 4 5 6 7 8