Git: Show all of the various changes to a single line in a specified file over the entire git history

前端 未结 5 1070
暖寄归人
暖寄归人 2020-12-22 23:30

I\'ve looked around, and am not sure if this is possible, but here goes:

I have a (javascript) file (say /lib/client.js) in which I have a unique identifier assigned

5条回答
  •  北海茫月
    2020-12-23 00:08

    You can also do this with gitk:

    gitk file.js
    

    In the "commit" drop down, choose "adding/removing string:" and in the text box next to it, enter "var identifier =", and any commits that add or remove lines that contain that string will be highlighted.

提交回复
热议问题