---
title: "筛选与搜索历史记录"
description: "在 gitā 中，你可以只显示单个分支、在图谱中隐藏或置顶分支、高亮或筛选特定作者的提交，并按提交信息、作者、路径或提交哈希搜索整个历史记录。"
url: https://getgita.app/zh-hans/features/filtering
lang: zh-Hans
---

# 只看 你正在寻找的内容

繁忙的仓库往往分支众多、参与者也多，令人无从看起。gitā 让你轻松将历史记录缩减到某个分支、某位作者或一次搜索结果，并支持一键恢复全貌。

A live copy of the app is on the page: https://getgita.app/zh-hans/features/filtering

## 试试看

1. 在侧边栏顶部的 **过滤** 输入框中输入关键词。
2. 右键点击侧边栏中的分支，选择 **仅显示此分支**。
3. 右键点击一条提交，展开其作者名称，然后选择 **高亮**。
4. 在历史记录上方的 **搜索提交信息** 中输入内容。

## 筛选与搜索

- **过滤侧边栏.** 侧边栏上方的输入框会将分支、标签和贮藏筛选为名称匹配的条目，并自动展开所有文件夹以便查看。
- **仅显示单个分支.** 从分支菜单或鼠标悬停时出现的按钮中选择“仅显示此分支”。历史记录顶部会标明当前查看的分支，点击“全部分支”即可返回。
- **隐藏或置顶分支.** “在图谱中隐藏”可将干扰视线的分支移出历史；“置顶”则能将关心的分支固定在侧边栏最上方。gitā 会为每个仓库单独记住这些设置。
- **高亮一位作者.** 右键点击提交，在其作者名称下选择“高亮”。该作者的提交会保持明亮，其余提交则变淡，同时保留完整的图谱结构。
- **按作者筛选.** 如果改选“筛选”，则会打开一个新标签页，仅包含该作者的提交，并为其单独绘制图谱。
- **搜索整个历史记录.** ⌘F 支持按提交信息、作者、路径或提交哈希搜索。它会遍历整个仓库，而不只限于已加载的提交，并且会限定在当前显示的分支范围内。
- **查看单个文件的历史.** 右键点击任意文件并选择“历史记录”，即可查看每一次修改过该文件的提交。

## Questions, answered

### Can I look at one branch only?

Yes. Choose **Show Only This Branch** from a branch's menu in the sidebar. The history's header says what you are looking at, and **All branches** takes you back.

### Can I search the whole history?

⌘F searches by message, author, path or commit. It looks through the entire repository, not only the commits that have loaded.

[全部功能](https://getgita.app/zh-hans/features.md)

- **下载 macOS 版:** https://github.com/rolottr/gita/releases/latest
- **在 GitHub 上查看:** https://github.com/rolottr/gita

---

Apple, macOS and Mac are trademarks of Apple Inc. Git is a trademark of Software Freedom Conservancy. GitHub is a trademark of GitHub, Inc. Vercel is a trademark of Vercel Inc. Claude is a trademark of Anthropic, PBC. gitā is independent software and is not affiliated with any of them. 问题反馈: https://github.com/rolottr/gita/issues
