Questions tagged [blame]

Blame is the annotation of source code showing who last edited each section or line.

Blame is the annotation of source code in a revision control system with metadata indicating the most recent commit that changed a particular section or line of code. The information typically includes a commit id, the identify of the user who made the change, and the timestamp of the change.

Commands for various revision control systems include:

  • RCS: (no such command is available)
  • CVS: cvs annotate
  • Subversion: svn blame (aliases are svn praise, svn annotate, svn ann)
  • Git: git blame (git annotate is similar but uses a slightly different output format)
  • Mercurial: hg blame (alias hg annotate)
125 questions
487
votes
14 answers

How can I view prior commits with git blame?

Is it possible to see who edited a specific line before the commit reported by git blame, like a history of commits for a given line? For example, I run the following (on the superb uncrustify project): $ git blame -L10,+1 src/options.cpp ^fe25b6d…
Aidan Steele
  • 10,999
  • 6
  • 38
  • 59
90
votes
4 answers

Git blame showing no history

When I run git blame on a file (using msysgit) I always get the following sort of printout: 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 1) package co 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 2) { 00000000 (Not Committed…
Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
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
70
votes
6 answers

Git: discover which commits ever touched a range of lines

I'm having trouble figuring out how to use git blame for getting the set of commits that ever touched a given range of lines. There are similar questions like this one but the accepted answer doesn't bring me much further. Let's say I have a…
joao
  • 3,517
  • 1
  • 31
  • 43
60
votes
8 answers

Is there a way to customize the output of git blame?

git log has a nice --format option to specify how the output should be formatted. But git blame doesn't seem to have an equivalent, although default output of blame is not quite human-friendly. I would like to see much less. For example, instead…
Rene Saarsoo
  • 13,580
  • 8
  • 57
  • 85
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
40
votes
3 answers

Is simplified semantics for the 'blame' command a good thing?

I'm working on a new weave-based data structure for storing version control history. This will undoubtedly cause some religious wars about whether it's The Right Way Of Doing Things when it comes out, but that isn't my question right now. My…
Bram Cohen
  • 599
  • 4
  • 12
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
30
votes
2 answers

HG: find where a deleted line was removed

I am looking for the mercurial equivalent of the solution to this question: How do I "git blame" a deleted line? In short, I am looking at a mercurial commit where a line was added, and in the current revision this line is no longer present, and I…
undefined
  • 6,208
  • 3
  • 49
  • 59
27
votes
1 answer

Eclipse with EGit, git-blame info is hard to see

using Eclipse Indigo Service Release 2, with EGit plugin and JDK 1.7. I've seen that it should support blame annotations, but I can't get it to show like I see here on Eclipse Wiki. Here's how it looks for me, you can't see the pointer but I'm…
localhost
  • 1,253
  • 4
  • 18
  • 29
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
24
votes
7 answers

Is there git blame gui similar to bzr qannotate?

As a former bzr user and novice to git I'm trying to find good GUI tool for git blame similar to bzr qannotate. The latter has 2 major views: file content viewer with short annotate information (who, in which revision changed the line) + coloring…
bialix
  • 20,053
  • 8
  • 46
  • 63
23
votes
1 answer

Blame on an earlier version of a file in a different location

At one point my git repository had its paths reorganized. I often want to do a blame on a file at a revision before the move. What's the git blame incantation to blame a file that doesn't exist in the current repository? I tried: > git blame…
Jeffrey Harris
  • 3,480
  • 25
  • 30
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
1
2 3
8 9