How to diff one file to an arbitrary version in Git?

前端 未结 13 2008
青春惊慌失措
青春惊慌失措 2020-12-07 07:12

How can I diff a file, say pom.xml, from the master branch to an arbitrary older version in Git?

相关标签:
13条回答
  • 2020-12-07 07:41

    If you are fine using a graphical tool (or even prefer it) you can:

    gitk pom.xml
    

    In gitk you can then click any commit (to "select" it) and right click any other commit to select "Diff this -> selected" or "Diff selected -> this" in the popup menu, depending on what order you prefer.

    0 讨论(0)
提交回复
热议问题