git-blame

Git blame ignoring specific commit [duplicate]

纵然是瞬间 提交于 2019-12-05 05:42:44
This question already has answers here : Git blame — prior commits? (13 answers) Closed 7 days ago . 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 checkout on commit before format-edited commit and see blame again, but it may take a lot of time on huge

IntelliJ annotate vs git blame

旧城冷巷雨未停 提交于 2019-12-05 03:36:11
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 IntelliJ ignores whitespace changes? I am using IntelliJ 15.0.1 and JGit 4.1.1 IntelliJ IDEA does not have

What does git blame do?

我与影子孤独终老i 提交于 2019-12-04 07:23:25
问题 I saw a lot of questions about methods of using git blame but I don't really understand them. I see a blame button on top of files on the github interface. Upon clicking it, It shows some diff with usernames on the left bar. What does that indicate? Why is git blame actually used, apart from GitHub? 回答1: From git-scm http://git-scm.com/docs/git-blame Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the

Vim Fugitive: Gblame reblame options

a 夏天 提交于 2019-12-04 06:23:23
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]) 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 running git blame <rev>~[count] -- <file> P Is equivalent to running git blame <rev>^[count] -- <file> For the

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

ⅰ亾dé卋堺 提交于 2019-12-04 02:10:23
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. This is due to renaming a parent folder on the file system with a new name that varies only by case - and some files were added in a commit occurring before the rename of the folder.

See who last changed a specific line in a Git repo [duplicate]

那年仲夏 提交于 2019-12-02 11:43:28
问题 This question already has answers here : Retrieve the commit log for a specific line in a file? (10 answers) Closed 6 years ago . I have use git blame and git log file.py to find changes, but is there a way to see the changes on a specific line on a file? For example: Line 84 on file index.html. 回答1: Very simple: git blame -L 84,84 index.html 来源: https://stackoverflow.com/questions/19352303/see-who-last-changed-a-specific-line-in-a-git-repo

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

百般思念 提交于 2019-12-01 19:45:54
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 impossible, but blame reports the file hasn’t been touched in weeks. It turns out blame reports changes for

Git commit that doesn't override original authors in git blame

微笑、不失礼 提交于 2019-11-27 03:46:00
I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces. $ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \ I can commit this change with git commit , but it will mark me as the author of all changed lines inside git blame after this commit is made. Is there any way to commit this massive change that doesn't mark me as the author of the changed lines, but retains the original author? That's a lot of history we don't really want to lose in our project. Our purpose in replacing tabs with 4 spaces is not to make things appear different in

Git commit that doesn&#39;t override original authors in git blame

▼魔方 西西 提交于 2019-11-26 10:47:28
问题 I\'ve used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces. $ find -iname \\*.php -exec perl -pi -e \"s/\\t/ /g\" {} \\ I can commit this change with git commit , but it will mark me as the author of all changed lines inside git blame after this commit is made. Is there any way to commit this massive change that doesn\'t mark me as the author of the changed lines, but retains the original author? That\'s a lot of history we don\'t really