How to view file history in Git?

后端 未结 10 951
借酒劲吻你
借酒劲吻你 2020-12-04 05:46

With Subversion I could use TortoiseSVN to view the history/log of a file.

How can I do this with Git?

Just looking for history record for a particular file

相关标签:
10条回答
  • 2020-12-04 06:12

    I like to use gitk name_of_file

    This shows a nice list of the changes that happened to a file at each commit, instead of showing the changes to all the files. Makes it easier to track down something that happened.

    0 讨论(0)
  • 2020-12-04 06:14

    git log --all -- path/to/file should work

    0 讨论(0)
  • 2020-12-04 06:14

    git-diff or git-log ?

    0 讨论(0)
  • 2020-12-04 06:16

    TortoiseGit also provides a command line tool to do see the history of a file. Using PowerShell:

    C:\Program` Files\TortoiseGit\bin\TortoiseGitProc.exe /command:log /path:"c:\path\to\your\file.txt"
    
    0 讨论(0)
提交回复
热议问题