tig

jonasGPL-2.0活跃维护

在终端里用 ncurses 界面浏览 git 提交历史、分支和差异,比命令行更直观,适合习惯纯文本环境的开发者。

Text-mode interface for git

tig-2.6.1发布于 2026-06-13 17:56 UTC13,377star +1 / 7 天675fork同步于 2026-11-10 11:27 UTC

怎么上手

由 README 提炼,执行前请确认
README 未给出安装命令,构建与安装步骤见 INSTALL.adoc
硬件要求按 README 说明

README 未说明;仅提到依赖 ncurses,未提及 GPU 或显存要求

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 ncurses 的 Git 文本界面,用来浏览仓库、按块暂存改动并充当 Git 命令的分页器

在终端里用 ncurses 界面浏览 git 提交历史、分支和差异,比命令行更直观,适合习惯纯文本环境的开发者。

核心能力

  • 用 ncurses 在终端里浏览 Git 仓库历史
  • 支持按 chunk 级别暂存改动以便提交
  • 可作为各类 Git 命令输出的分页器
  • 提供 tig -v 查看自身与 ncurses 版本

容易踩的坑

构建安装步骤不在 README 中,需另看 INSTALL.adoc;依赖 ncurses,需先确认系统已安装对应库;提交 bug 报告时需附上 tig -v、uname -a 和 git -v 的输出

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本tig-2.6.1
  1. tig-2.6.1最新正式版2026-06-13 · 2026-06-13 17:56 UTC

    Security fixes:

    • Fix editor command injection vulnerability (only affects version 2.6.0). (#1432)

    Bug fixes:

    • Fix notes handling in the main view. (#1394)
    • Honor init_size in string_map_put_to().
    • Reset view->parent both when switching and closing view.
    • Fix grep with revision argument. (#1398)
    • Minor tweaks to the blame view.
    • Fix repo info in bare repository with no HEAD.
    • Document %(status). (#1406)
    • Update Cygwin build.
    • Fix "DU" conflicts showing as 'Staged changes' in the main view. (#471)
    • Ensure consistent blame view access from the blob view.
    • Fix compiler warning with glibc-2.43.
    • contrib: chocolate-theme: Fix cursor color in backgrounded view. (#1419)
    • Fix date for 'Not Committed Yet' changes. (#1423)
    • Fix slow tig status when given a subdirectory path. (#1424)
    • Handle pure file rename in the diff view. (#1426)

    Improvements:

    • Handle the NO_COLOR environment variable. (#1402)
    • Run tests against system's tig when SYSTEM_TIG=1. (#1400)
    • Support option append. (#1413)
    • Add an option to make the tree view recursive.
    • Enable direct blob edits in clean HEAD state. (#1415, #1416)

    Change summary

    The diffstat and log summary for changes made in this release.

     .gitignore                                    |   1 +
     INSTALL.adoc                                  |  50 ++-----
     Makefile                                      |  36 +++--
     NEWS.adoc                                     |  38 ++++-
     README.adoc                                   |   5 +-
     appveyor.yml                                  |   2 +-
     compat/ansidecl.h                             | 137 +++++++++++------
     compat/compat.h                               |   2 +-
     compat/hashtab.c                              | 141 +++++++++---------
     compat/hashtab.h                              |  24 ++-
     compat/wordexp.c                              |   2 +-
     contrib/chocolate.theme.tigrc                 |   2 +
     ...ke-CYGWIN_NT-6.1 => config.make-CYGWIN_NT} |  17 +++
     contrib/tig-completion.bash                   |   2 +-
     contrib/tig.cygport.in                        |  30 ++++
     doc/manual.adoc                               |   2 +-
     doc/tig.1.adoc                                |   2 +-
     doc/tigrc.5.adoc                              |  17 ++-
     include/tig/apps.h                            |   2 +-
     include/tig/argv.h                            |   2 +-
     include/tig/blame.h                           |   2 +-
     include/tig/blob.h                            |   2 +-
     include/tig/diff.h                            |   2 +-
     include/tig/display.h                         |   2 +-
     include/tig/draw.h                            |   2 +-
     include/tig/git.h                             |   6 +-
     include/tig/graph.h                           |   2 +-
     include/tig/grep.h                            |   2 +-
     include/tig/help.h                            |   2 +-
     include/tig/io.h                              |   2 +-
     include/tig/keys.h                            |   2 +-
     include/tig/line.h                            |   4 +-
     include/tig/log.h                             |   2 +-
     include/tig/main.h                            |   3 +-
     include/tig/map.h                             |   2 +-
     include/tig/options.h                         |  14 +-
     include/tig/pager.h                           |   2 +-
     include/tig/parse.h                           |   2 +-
     include/tig/prompt.h                          |   2 +-
     include/tig/refdb.h                           |   2 +-
     include/tig/reflog.h                          |   2 +-
     include/tig/refs.h                            |   2 +-
     include/tig/repo.h                            |   2 +-
     include/tig/request.h                         |   2 +-
     include/tig/search.h                          |   2 +-
     include/tig/stage.h                           |   2 +-
     include/tig/stash.h                           |
    
  2. tig-2.6.02025-09-16 · 2025-09-16 20:06 UTC
    查看更新说明

    Bug fixes:

    • Initialise %(head) from command line arguments. (#1366)
    • Make $GIT_EDITOR value interpreted by the shell. (#1367)
    • Use correct line from recursively blamed commit. (#1369, #1370)
    • Use correct line when using :parent in blame view. (#1372)
    • Fix the incorrect line shift after stage file. (#1371)
    • Update display after setting column option. (#1384)
    • Fix file mode diff header handling.
    • Fix crash caused by too many diff cells. (#1389)
    • Fix issue with blame when using absolute file paths. (#1391)

    Improvements:

    • Add color for cursor in backgrounded view. (#1374)
    • Blame view now works without a working tree.
    • Open diff view from blame at the correct line. (#1375)
    • Document how to get a < within TIG_SCRIPT. (#1357)
    • Allow to hide +/- signs in the diff view. (#855, #901)
    • Add toggle options to help. (#1381)
    • Add expand/collapse all options to help. (#1382)
    • Expand relevant sections only when opening the help view. (#782, #886)
    • Introduce committer column.
    • Open the blame and blob views from diffstat.
    • Update utf8proc to v2.11.0, supporting Unicode 17.

    Note: Users should update the settings for the blame, main, reflog, refs and tree views in their ~/.tigrc file to include the committer column.

    Change summary

    The diffstat and log summary for changes made in this release.

     .github/workflows/linux.yml                 |     2 +-
     INSTALL.adoc                                |     4 +-
     Makefile                                    |     2 +-
     NEWS.adoc                                   |    32 +
     README.adoc                                 |    19 +-
     appveyor.yml                                |     1 +
     compat/utf8proc.c                           |     6 +-
     compat/utf8proc.h                           |    11 +-
     compat/utf8proc_data.c                      | 14261 +++++++++---------
     contrib/tig.spec.in                         |     2 +-
     doc/manual.adoc                             |    10 +-
     doc/tig.1.adoc                              |    14 +-
     doc/tigrc.5.adoc                            |    40 +-
     include/tig/argv.h                          |     1 +
     include/tig/diff.h                          |     2 +
     include/tig/help.h                          |     2 +
     include/tig/keys.h                          |     1 +
     include/tig/line.h                          |     9 +-
     include/tig/main.h                          |     4 +-
     include/tig/options.h                       |     6 +-
     include/tig/parse.h                         |    10 +-
     include/tig/types.h                         |     1 +
     include/tig/view.h                          |     1 +
     src/blame.c                                 |    34 +-
     src/diff.c                                  |    45 +-
     src/display.c                               |    21 +-
     src/draw.c                                  |    21 +-
     src/help.c                                  |   107 +-
     src/keys.c                                  |    20 +-
     src/main.c                                  |    32 +-
     src/options.c                               |    12 +-
     src/parse.c                                 |    29 +-
     src/prompt.c                                |    56 +-
     src/reflog.c                                |     4 +-
     src/refs.c                                  |    42 +-
     src/stage.c                                 |     9 +-
     src/status.c                                |     2 +-
     src/tig.c                                   |    37 +-
     src/tree.c                                  |    27 +-
     src/view.c                                  |    16 +
     test/blame/blob-blame-test                  |    55 +
     test/blame/default-test                     |    56 +-
     test/blame/navigation-parent-test           |    58 +
     test/diff/editor-test                       |     2 +
     test/help/all-keybindings-test              |     7 +-
     test/help/all-keybindings-test.exp
    
  3. tig-2.5.122025-02-06 · 2025-02-06 18:40 UTC
    查看更新说明

    Bug fixes:

    • Fix empty blame view when opened from the diff view on i586. (#1362)

    Change summary

    The diffstat and log summary for changes made in this release.

     INSTALL.adoc | 4 ++--
     Makefile     | 2 +-
     NEWS.adoc    | 8 ++++++++
     src/diff.c   | 2 +-
     4 files changed, 12 insertions(+), 4 deletions(-)
    
    Thomas Koutcher (2):
          Fix empty blame view when opened from the diff view on i586
          tig-2.5.12
    
  4. tig-2.5.112025-01-30 · 2025-01-30 19:35 UTC
    查看更新说明

    Incompatibilities:

    • Update remote repo variables. (#1358)

    Bug fixes:

    • Fix various issues with diff.noprefix and --no-prefix.
    • Fix Ctrl-C behavior within the Readline prompt. (#1342)
    • Fix message upon edit from diffstat without patch.
    • Fix missing dates in the refs view.
    • Don't report an error when diff-highlight is killed intentionally.
    • Fix parsing of reflog designator in timestamp format.

    Improvements:

    • Open the blob corresponding to the diff line. (#1334)
    • Keep cursor position in the main view when toggling file-filter and rev-filter.
    • Make errors visible in views showing Git output. (#1346)
    • Allow different colors for all references types.
    • Enable search in sections titles. (#1043)
    • Show committer date by default in the date column. (#294)
    • Update utf8proc to v2.10.0, supporting Unicode 16.
    • Only show stash, notes and prefetch in the refs view when invoked with tig refs --all. (#1359)

    Change summary

    The diffstat and log summary for changes made in this release.

     INSTALL.adoc                    |     4 +-
     Makefile                        |     7 +-
     NEWS.adoc                       |    28 +
     compat/compat.h                 |     2 +-
     compat/utf8proc.c               |    53 +-
     compat/utf8proc.h               |   104 +-
     compat/utf8proc_data.c          | 30816 +++++++++++++++---------------
     compat/wordexp.c                |     2 +-
     contrib/tig-completion.bash     |     2 +-
     doc/asciidoc.conf               |     3 +
     doc/manual.adoc                 |    14 +-
     doc/tig.1.adoc                  |     2 +-
     doc/tigrc.5.adoc                |    13 +-
     include/tig/apps.h              |     2 +-
     include/tig/argv.h              |     2 +-
     include/tig/blame.h             |     2 +-
     include/tig/blob.h              |     2 +-
     include/tig/diff.h              |     2 +-
     include/tig/display.h           |     2 +-
     include/tig/draw.h              |     2 +-
     include/tig/git.h               |    14 +-
     include/tig/graph.h             |     2 +-
     include/tig/grep.h              |     2 +-
     include/tig/help.h              |     2 +-
     include/tig/io.h                |     2 +-
     include/tig/keys.h              |     2 +-
     include/tig/line.h              |     6 +-
     include/tig/log.h               |     2 +-
     include/tig/main.h              |     2 +-
     include/tig/map.h               |     2 +-
     include/tig/options.h           |     8 +-
     include/tig/pager.h             |     2 +-
     include/tig/parse.h             |     4 +-
     include/tig/prompt.h            |     2 +-
     include/tig/refdb.h             |     2 +-
     include/tig/reflog.h            |     2 +-
     include/tig/refs.h              |     2 +-
     include/tig/repo.h              |     3 +-
     include/tig/request.h           |     2 +-
     include/tig/search.h            |     2 +-
     include/tig/stage.h             |     2 +-
     include/tig/stash.h             |     2 +-
     include/tig/status.h            |     2 +-
     include/tig/string.h            |     2 +-
     include/tig/tig.h               |     2 +-
     include/tig/tree.h              |     2 +-
     include/tig/types.h             |     9 +-
     include/tig/ui.h                |     2 +-
     include/tig/util.h              |     2 +-
     include/tig/view.h              |     2 +-
     include/tig/watch.h             |     2 +-
     src/apps.c                      |     2 +-
     src/argv.c                      |     2 +-
     src/blame.c                     |     9 +-
     src/blob.c                      |     2 +-
     src/diff.c                      |    31 +-
     src/display.c                   |     2 +-
     src/draw.c                      |     2 +-
     src/graph-v1.c                  |     2 +-
     src/graph-v2.c                  |     2 +-
     src/graph.c                     |     2 +-
     src/grep.c                      |     2 +-
     src/help.c                      |     2 +-
     src/io.c                        |     2 +-
     src/keys.c    
    
  5. tig-2.5.102024-05-10 · 2024-05-10 22:08 UTC
    查看更新说明

    Bug fixes:

    • Fix stat-* coloring file names in tig status instead of just markers (regression in 2.5.9). (#1326)
    • Fix keybinding with +[cmd] not triggering view refreshing. (#1324)
    • Fix reopening the blame view from the main view.
    • Fix editing when stdin is redirected. (#1330)
    • Fix compilation warnings with ncurses 6.5.
    • Make Ctrl-C to kill only the command running in the foreground. (#1331)

    Change summary

    The diffstat and log summary for changes made in this release.

     INSTALL.adoc      |  4 ++--
     Makefile          |  2 +-
     NEWS.adoc         | 13 +++++++++++++
     include/tig/io.h  |  2 +-
     include/tig/tig.h |  2 ++
     src/blame.c       | 11 +++++++++--
     src/display.c     | 15 +++++++--------
     src/draw.c        | 12 +++++++-----
     src/io.c          | 18 +++++++++++++++---
     src/main.c        |  8 ++++++++
     src/status.c      |  4 ++--
     src/tree.c        |  5 ++---
     src/view.c        |  5 +++--
     13 files changed, 72 insertions(+), 29 deletions(-)
    
    Thomas Koutcher (6):
          Fix keybinding with +[cmd] not triggering view refreshing (#1324)
          Fix reopening the blame view from the main view
          Fix editing when stdin is redirected
          Fix compilation warnings with ncurses 6.5
          Make `Ctrl-C` to kill only the command running in the foreground
          tig-2.5.10
    
    xaizek (1):
          Fix incorrect filename coloring in tig status (#1326)
    

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Tig: text-mode interface for Git

    :docext: adoc

    image:https://github.com/jonas/tig/workflows/Linux/badge.svg[Linux CI,link=https://github.com/jonas/tig/actions?query=workflow%3ALinux] image:https://github.com/jonas/tig/workflows/macOS/badge.svg[macOS CI,link=https://github.com/jonas/tig/actions?query=workflow%3AmacOS] image:https://ci.appveyor.com/api/projects/status/jxt1uf52o7r0a8r7/branch/master?svg=true[AppVeyor Build,link=https://ci.appveyor.com/project/fonseca/tig]

    What is Tig?

    Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.

    Resources

    Bugs and Feature Requests

    Bugs and feature requests can be reported using the https://github.com/jonas/tig/issues[issue tracker] or by mail to the https://lore.kernel.org/git/[Git mailing list]. Ensure that the word "tig" is in the subject. For other Tig related questions please use Stack Overflow: https://stackoverflow.com/questions/tagged/tig[].

    If you are sending a bug report, please include the following information:

    • What Tig and ncurses versions are you using? (tig -v)
    • What system do you have? (uname -a, lsb_release -a)
    • What Git version are you using? (git -v)

    Installation and News

    Information on how to build and install Tig are found in link:INSTALL.{docext}[the installation instructions].

    News about releases and latest features and bug fixes are found in link:NEWS.{docext}[the release notes].