View the change history of a file using Git versioning

后端 未结 24 2066
臣服心动
臣服心动 2020-11-22 16:40

How can I view the change history of an individual file in Git, complete details with what has changed?

I have got as far as:

git log -- [filename]
         


        
24条回答
  •  生来不讨喜
    2020-11-22 17:32

    SourceTree users

    If you use SourceTree to visualize your repository (it's free and quite good) you can right click a file and select Log Selected

    enter image description here

    The display (below) is much friendlier than gitk and most the other options listed. Unfortunately (at this time) there is no easy way to launch this view from the command line — SourceTree's CLI currently just opens repos.

    enter image description here

提交回复
热议问题