git-blame

Git blame ignoring specific commit [duplicate]

烈酒焚心 提交于 2020-01-13 09:01:14
问题 This question already has answers here : Git blame — prior commits? (13 answers) Closed last month . I use git blame command to see in which commit have been added some particular code line, but sometimes I bump into the same problem: someone has made some kind of code formatting, or has changed function interface and refreshed all client code. Eventually git blame show me only this last commit on particular code line. How ignore this commit and see what happened before it? Of course I can

git blame on windows reports “fatal: no such path <path> in HEAD”

耗尽温柔 提交于 2020-01-01 08:17:20
问题 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 - so what is going on? I'm posting this question and answer as it had me stumped for a while today, and I couldn't find a single answer that hit all of the solution. 回答1: This is due to renaming a parent folder on the file system with a new name

If I Resolve a Conflict Does it Change Git Blame?

本小妞迷上赌 提交于 2019-12-22 06:58:18
问题 I'm trying to figure out whether a merge conflict was responsible for a bug, but I'm having difficulty because I'm not clear on how conflict resolution affects git blame . Let's say I have a file in master: a(); b(); c(); I modify it in master: a(); d(); c(); but so does a co-worker, and they modify it differently, in a separate branch which they then merge in to master: a(); e(); c(); Can resolving that conflict affect the blame? In other words, if my co-worker resolves the conflict by going

If I Resolve a Conflict Does it Change Git Blame?

社会主义新天地 提交于 2019-12-22 06:58:04
问题 I'm trying to figure out whether a merge conflict was responsible for a bug, but I'm having difficulty because I'm not clear on how conflict resolution affects git blame . Let's say I have a file in master: a(); b(); c(); I modify it in master: a(); d(); c(); but so does a co-worker, and they modify it differently, in a separate branch which they then merge in to master: a(); e(); c(); Can resolving that conflict affect the blame? In other words, if my co-worker resolves the conflict by going

IntelliJ annotate vs git blame

随声附和 提交于 2019-12-22 04:01:44
问题 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 and still uses the old commit message. JGit does not see it and so makes an other message. Can anybody confirm that the behavior of JGit blame and IntelliJ differs? Whats the reason and how can I force IntelliJ to behave the same like JGit? Maybe

How does --no-ff merge break bisect and blame?

╄→гoц情女王★ 提交于 2019-12-20 01:01:43
问题 Understanding the Git Workflow article says, So you add a new rule: “When you merge in your feature branch, use –no-ff to force a new commit.” This gets the job done, and you move on. Then one day you discover a critical bug in production, and you need to track down when it was introduced. You run bisect but keep landing on checkpoint commits. You give up and investigate by hand. You narrow the bug to a single file. You run blame to see how it changed in the last 48 hours. You know it’s

Vim Fugitive: Gblame reblame options

喜欢而已 提交于 2019-12-12 08:51:16
问题 I've been using Fugitive's Gblame recently but don't quite understand what "reblame" does. Can someone describe a little more clearly what these options do: - reblame at commit ~ reblame at [count]th first grandparent P reblame at [count]th parent (like HEAD^[count]) 回答1: Think of reblame as navigating to a commit and then running blame on your file or git blame <commit> -- <file> - the simplest case. Use the commit in question under your cursor and reblame the file. ~ Is equivalent to

Git blame on files/folders level?

偶尔善良 提交于 2019-12-11 11:48:12
问题 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 last commit affecting each file. Judging from the options it is not possible to do using git blame but is there some other command that might do something similar? EDIT: Ideally I'd like to get a list with the file names where for each file we also

git: number of lines *not* changed since specific commit?

对着背影说爱祢 提交于 2019-12-11 10:53:40
问题 There are plenty of answers with great command line fu to find changes (or change statistics), but I'd like to find the opposite: how many lines (per file) have not changed since a particular commit? The closest I could find is this: How to find which files have not changed since commit? but I'd like to know how many lines (ideally: in each file) have survived unchanged, not which files. So, basically: can git diff --stat output unchanged lines in addition to insertions and deletions?

Improve IntelliJ annotate (git blame)

倾然丶 夕夏残阳落幕 提交于 2019-12-10 03:46:56
问题 I'd like to improve the "annotate option" (right click on code line number colon -> annotate), which is similar to git blame (but integrated to IntelliJ). 1/ Is it possible ? (via plugin or raw modification of IntelliJ files ? something else ?) 2/ I'm on Android Studio (based on IntelliJ), will it be an issue ? 3/ If 1/ & 2/ are true, any tips on how to start ? PS : My goal is not to display some commits (like "Reformat") in the annonate because they do not provide crucial informations about