如何按 SourceTree 中的文件夹过滤日志? [英] How do I filter log by folder in SourceTree?
问题描述
在 SourceTree 中,如何将日志限制为仅显示影响给定文件夹中文件的提交?
即相当于:git log path/to/folder
This Answer is Outdated
这个答案现在过时了.它是在之前编写的,Windows版本的SourceTree内置了这个功能.当前版本的 SourceTree for Windows (1.5.2.0) 现在具有此功能,因此 @bozi 的解决方案现在应该适用于两者SourceTree 的 Windows 和 Mac 版本.
原答案
除了使用 SourceTree,您还可以使用
gitk -- 文件夹路径
仅查看文件夹的历史记录.gitk
采用许多与 git log
相同的选项.
另一种选择是使用另一个 Git gui,例如 TortoiseGit,它可以让您在 Windows 资源管理器中选择文件夹并右键单击以获取上下文菜单,您可以从中选择查看该特定文件夹的日志.>
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
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.
这篇关于如何按 SourceTree 中的文件夹过滤日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!