Git blame ignoring specific commit [duplicate]

烈酒焚心 提交于 2020-01-13 09:01:14

问题


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 project and doesn't appropriate.


回答1:


I think you are looking for the -w option that excludes white space. According to the man page.

Ignore whitespace when comparing the parent’s version and the child’s to find where the lines came from.

Moved code can also be excluded. See the -M and -C options. See https://git-scm.com/docs/git-blame



来源:https://stackoverflow.com/questions/57327486/git-blame-ignoring-specific-commit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!