How do I filter log by folder in SourceTree?

前端 未结 4 1254
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 00:47

In SourceTree, how do I limit the log to only show commits that affected files within a given folder?

I.e. the equivalent to: git log path/to/folder

4条回答
  •  忘掉有多难
    2021-02-07 01:02

    This Answer is Outdated

    This answer is now outdated. It was written before the Windows version of SourceTree had this feature built-in. The current version of SourceTree for Windows (1.5.2.0) has this feature now, so @bozi's solution should now work for both the Windows and Mac versions of SourceTree.

    Original Answer

    Instead of using SourceTree, you can use

    gitk -- folderPath
    

    to view the history of just the folder. gitk takes many of the same options that git log does.

    Another option is to use another Git gui like TortoiseGit, which will let you select folders in Windows Explorer and right-click to get a context menu, from which you can select to view the log for that one particular folder.

提交回复
热议问题