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
1
vote
0 answers

How to run "git blame" on a given set of files using Octokit

I'm pretty new to the Ruby world and I'm working on a legacy ruby script that uses Octokit to which I need to add the support for running "git blame" command on a bunch of files to figure out the developers involved in causing conflicts. I went…
Enigma40
  • 11
  • 3
1
vote
1 answer

how to fix Losing git blame feature after commit? (EOL conflict)

I started to see that in some commits of my colleges, the files they changed a few lines are "marked" as if they modified them completely. We are losing the possibility to use Git Blame on these files to see "who changed which line" I can't figure…
FiruzzZ
  • 661
  • 1
  • 6
  • 21
1
vote
2 answers

Git blame for deleted section

I need to know who and when deleted some portion of a source file using git. Unfortunately, it seems git blame won't directly show me that, as said section is totally absent from file in the current revision. Any suggestions ?
Charles
  • 988
  • 1
  • 11
  • 28
1
vote
1 answer

how can I git diff a file over specific line or lines?

Is it possible to ask git diff to only check changes over some lines on a file? Like if I run git diff some-file, I see many many changes.... different sections of the file, but if I only want to see the differences related to one specific line of…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
1
vote
1 answer

Passing `git blame` options to `git gui blame`

How can I pass git blame options such as -C to git gui blame? Merely typing git gui blame -C somefile results in error: unknown switch `-C' usage: git cat-file ...
xuhdev
  • 8,018
  • 2
  • 41
  • 69
1
vote
0 answers

How to identify different authors in same pull request?

I have one pull request with commits from different authors. How can I identify inside Bitbucket diff view, which person made which change so I can tag them to review their respective modification? Right know i need to open each file individually in…
Matheus Oliveira
  • 587
  • 3
  • 10
  • 33
1
vote
1 answer

Git blame on files/folders level?

Is it possible to git blame on a files/folders level instead of the "line by line"-level? The command git blame usually shows the last commit affecting each line in a given document, but what I'm wondering is whether you get a list of what was the…
flawr
  • 10,814
  • 3
  • 41
  • 71
1
vote
1 answer

Why `git blame -e` sometimes print filenames and sometimes don't?

See the following example (in the LLVM source tree cloned from https://github.com/llvm-mirror/llvm). Why sometimes the file names are printed and sometimes don't? Thanks. llvm$ git blame -e ./include/llvm/IR/Instruction.h 3a8b0f00e6d2…
user1424739
  • 11,937
  • 17
  • 63
  • 152
1
vote
2 answers

determine if commit contains changes that remain in current version

Context: Often while investigating an issue, I will introduce debugging statements (isolated from the solution, in their own commits), and then once I have a solution I will remove all these debug statements. Sometimes, however, when viewing a diff…
Zoey Hewll
  • 4,788
  • 2
  • 20
  • 33
1
vote
1 answer

Is there any way to do a git blame on the assets file in Xcode?

I'm trying to track a diff within the assets.xcassets file in Xcode but I can't find a way to do a git blame.
Steve Moser
  • 7,647
  • 5
  • 55
  • 94
1
vote
1 answer

Blame information not displayed in few SonarQube projects

We are using SonarQube Version 5.6.3 and GitLab for version control. On certain projects, the blame entries are not displayed in SonarQube projects whereas it is shown on the rest of the projects. There seems to be no difference in the project…
Aishwaryameenakshi
  • 189
  • 1
  • 1
  • 9
1
vote
0 answers

git blame when a line comes from two branches

How does git-blame blame a line that is coming from 2 different revisions on 2 branches that were merged? Context I'm working with git-svn and I'm sick of seeing lines on blame that only point to a "merge" revision where there was no, say, real…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
1
vote
1 answer

What exactly is incremental about git blame --incremental?

The docs state: --incremental Show the result incrementally in a format designed for machine consumption. But looking at the output I don't see anything more than it being a summary without the actual lines of the files. How does…
Joshua Olson
  • 3,675
  • 3
  • 27
  • 30
1
vote
1 answer

How to use git blame -S

What is the format of the revs-file argument for git blame -S? I have tried running it with the output of git rev-list as follows but the blame attributes every line to the HEAD commit. git blame -S <(git rev-list HEAD~50 HEAD) $file I have also…
arcyqwerty
  • 10,325
  • 4
  • 47
  • 84
1
vote
1 answer

preserving blame in package.json

Because commas cannot be added to the last element of an object or an array in package.json, the line blame in not preserved; that is, if I have the following in package.json in commit A: { "version": "0.0.1" } And then in commit B I add another…
Robz
  • 1,747
  • 5
  • 21
  • 35