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
0
votes
1 answer

What are the performance characteristics of git blame ignore-revs?

I am aware of git's --ignore-revs option for asking git blame to ignore, for example, revisions that contain automated code formatting changes. I am working on a project to steer a moderate sized codebase towards a new code formatting tool, and…
jdevries3133
  • 135
  • 1
  • 6
0
votes
1 answer

git - how can I _copy_ a file and still be able to use the original history when blaming?

How can I create a copy of a file and make it so that git understands where it is coming from? If I just do a copy and add it to the branch, git is not able to figure it out: $ git log --oneline --graph --name-status master * 70f03aa (master)…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
0
votes
0 answers

Is there a difference between git blame -m and git blame -M?

The git-blame man page does not mention -m, but only -M. Running git-blame on a source file with a very long commit history, once with -m and again with -M, shows identical output (also using -CCC in both executions). Is this just a mistake in the…
bgoodr
  • 2,744
  • 1
  • 30
  • 51
0
votes
0 answers

Getting all lines by author per file in git

I want to get all authors that contributed to a file (working). Additionally I want the number of lines from each author of a file (working). And in the end I also want each line number that was contributed by each author. The format should not be…
Elim Garak
  • 33
  • 5
0
votes
1 answer

Getting unified history/blame/diff across repositories?

For reasons out of my control, I have two repositories (say, "R" and "S"), and code was moved from one repository to another. More specifically: R: Root ... a (add "code" folder) --- b (changes in "code") ... f (remove "code") ... S: Root ... a (add…
13steinj
  • 418
  • 5
  • 12
0
votes
1 answer

export git blame to PDF or HTML

Is there a programmatic way to export git blame from a (text) file to either PDF (preferred) or HTML? I know that github already offers a blame view in webbrowser (see e.g. here), but in the end I want to do a blame-export for all files in a given…
hardmooth
  • 1,202
  • 2
  • 19
  • 36
0
votes
1 answer

Intellij and Pycharm annotate showing a fixed wrong date

I am facing a quite bizarre situation regarding Intellij IDEA and Pycharm annotate (git blame) functionality. Late last year I decided to install different JDKs on my MacOS Mojave (version 10.14.6) for development purposes. It seemingly messed up…
eribeiro
  • 572
  • 3
  • 7
0
votes
0 answers

Git log for a specific line in a file between the commit id and a prior date?

Supposing to have a file (and its path) path/to/file in a specific version committed in a commit with a specific sha that we call hex_sha. After the use of git blame file/to/path hex_sha I get each row modified in that revision. For this example we…
F. Petrulio
  • 95
  • 2
  • 9
0
votes
2 answers

Meaning of double dot (..) when using it with git-blame command

Having an initial repository I create a Test.TXT file and fill it in with this content: Version 1 Version 1 Version 1 Next, it is committed: $ git commit -am Version1 And the Test.TXT has suffered some ammendment: Version 1 Version 2 Version 1 $…
Ilya Loskutov
  • 1,967
  • 2
  • 20
  • 34
0
votes
1 answer

How to find all the "active" git commits in a tree?

I'd like to get a snapshot of "active" git commits has for a directory tree, meaning git commits that really are part of the build and not commits that have been fully superseded by newer commits. I can do this by running git blame on every file and…
CCS
  • 11
  • 1
  • 2
0
votes
2 answers

How to get all the authors of a group of files in Git?

I'd like some help from the git blame/bash/awk gurus. I want to get a list all the people, who appear in the git blame of each file in a particular group of files. Example: files A and B; git blame lists John, Terry, and Merry as authors of various…
Alexander Popov
  • 23,073
  • 19
  • 91
  • 130
0
votes
1 answer

How to delete GitHub blame history?

I'd like to delete the GitHub blame history that GitHub shows (tracking all changes made) I am aware of how to how to roll back changes, but I am not trying to roll back any changes I have made, I am simply trying to delete this history of the…
H. Khan
  • 111
  • 12
0
votes
1 answer

Is it possible to make a commit that does not rewrite the previous commit author?

I know this sounds bad but this is my use case. We have a big old code base that always carries some dumb merge conflicts like extra commas or new formats. We want to introduce an automatic code formatter to give consistence between the entire…
distante
  • 6,438
  • 6
  • 48
  • 90
0
votes
1 answer

How to use git blame to track change deep in history

I've tried to do this on GitHub but I've keep getting timeout error. I want to use git blame to get the changes and commits before single commit. On GitHub I've tried to us git blame to find one change that I'm interested get the commit of the…
jcubic
  • 61,973
  • 54
  • 229
  • 402
0
votes
0 answers

Can I show author and commit log in diff inside bitbucket?

Here is my context: I am working in a repository with two branches: master and develop. All the team makes local changes in their code and after finishing their task they merge their commits into the develop branch. After some time, a Pull Request…
Matheus Oliveira
  • 587
  • 3
  • 10
  • 33