128 questions
0
votes
1
answer
59
views
What could cause git blame to think all code are authored by the most recent commit?
It's my first time working on this ruby on rails repo. For every single .rb file, git blame shows all lines are authored by the person with the most recent commit. However I know this is not the case ...
0
votes
0
answers
28
views
Get directory using which blame.ignoreRevsFile is resolved
It seems that the path in Git config blame.ignoreRevsFile is either resolved relative to the work tree (for repositories with a work tree), or relative to the repository itself (for bare repositories)....
1
vote
0
answers
54
views
git blame only commits on feature-branch after master?
If I've branched off master onto feat-branch, can I run git blame on a file and only highlight/emphasize lines changed in commits after I diverged from master?
This would be helpful for when I am ...
0
votes
0
answers
56
views
How to tell Git to use textconv for diffs but not for blame?
I have a repository with lots of 3rd party files located in subdirectory vendor and a few hundred files that I maintain. I have following .gitattributes file:
[attr]BINARY diff=binary -merge -text
...
0
votes
1
answer
113
views
How to recover per-line git blame history after line endings were changed to CR?
Multiple developers have contributed to a project over few years.
A few commits ago one commit has changed the line endings in a single file from our standard LF (0x10) to CR (0x13). Reason unknown.
...
1
vote
0
answers
114
views
Git blame API for bitbucket
On receiving bitbucket pull request webhook event I want to find who previously made the change in line which is being change in this new pull request. One idea is to use gitblame api however I am not ...
0
votes
0
answers
33
views
VS Code: Find occurrences of text only in changes made by me
When I use ctrl+shift+f I want to find only those text occurrences, which git registered as made by me.
1
vote
1
answer
436
views
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 ...
2
votes
0
answers
137
views
Git commit without changing author
I'm planning to migrate a library that is heavily used in our repository to another library which will need me to replace lines in hundreds of files.
I'd like the author to not change for this commit. ...
3
votes
0
answers
428
views
git automatically ignore commits by file
I'm using the following command for git to ignore commits listed in .git-blame-ignore-revs
git config blame.ignoreRevsFile .git-blame-ignore-revs
This file is tracked in a remote git repo. Every ...
4
votes
1
answer
590
views
How to get `git grep` to show `git blame`-like information
I'd like to git grep in the usual way, but with something like the additional insight of git blame in the displayed results.
In some instances I probably would benefit from including the metadata in ...
-1
votes
2
answers
823
views
How can I show annotations in PhpStorm/WebStorm search preview
When previewing a file in the search window, the "Annotate" (git blame) option is grayed out. Is there a way to enable this with an config option or a plugin? Searching "phpstorm show ...
42
votes
5
answers
10k
views
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 ...
21
votes
2
answers
17k
views
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 ...
2
votes
1
answer
570
views
Get git blame for full Github repository via api
I'd like to get the output of git blame <file> for all files in a repository recursively.
I want to do this without cloning the repository first, by using Github's GraphQL v4 api.
Is this ...
2
votes
1
answer
1k
views
How to "revive" git blame history
I find myself in a precarious situation.
I work on refactoring a big, existing codebase. I decided to comment out some tests and enable them gradually as I adapt the code. Unfortunately, I committed ...
2
votes
1
answer
476
views
How does git create a file blame?
I recently learned about git blame and what it does. I want to know how git finds when each line was changed in a file, even across file renames. In other words, I want to know how the blame algorithm ...
2
votes
1
answer
285
views
git blame: count amount of characters contributed by a developer (tracking renames)
For certain statistical purpuses I need to precisely count the amount of characters contributed by a developer to the current state of a git repo (HEAD).
The closest I could get was this command:
wc -...
1
vote
0
answers
208
views
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 ...
0
votes
0
answers
47
views
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 ...
0
votes
2
answers
263
views
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 ...
1
vote
2
answers
414
views
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 ...
1
vote
1
answer
3k
views
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 ...
0
votes
2
answers
1k
views
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 ...
3
votes
1
answer
664
views
Robustly retrieve SHA and line content with Git blame (Python3)
I'm contributing to a package (Python >= 3.5) that uses git blame to retrieve information on files. I'm working on replacing the GitPython dependency with custom code supporting just the small subset ...