目錄 搜尋
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
文字

命名

gitk  -  Git 存储库浏览器

概要

gitk [<options>] [<revision range>] [\--] [<path>…]

描述

显示存储库或选定提交集中的更改。这包括可视化提交图,显示与每个提交相关的信息以及每个修订的树中的文件。

选项

为了控制显示哪些版本,gitk 支持适用于该git rev-list命令的大多数选项。它还支持适用于这些git diff-*命令的几个选项,以控制每个提交所引入的更改的方式。最后,它支持一些特定于 gitk 的选项。

sticked由于命令行解析器的局限性,gitk 通常只能理解表单中带有参数的选项(请参阅 gitcli [7])。

rev-list 选项和参数

本手册页仅介绍最常用的选项。请参阅 git-rev-list [1] 获取完整列表。

--all

显示所有参考(分支,标签等)。

--branches=<pattern>   --tags=<pattern>   --remotes=<pattern>

假设所有分支(标记,远程分支,响应)都在命令行中列为<commit>。如果<pattern>给出,则限制引用与给定 shell glob 相匹配的引用。如果模式没有?*或者[/*在结束时暗示。

--since=<date>

显示比特定日期更近的提交。

--until=<date>

显示比特定日期更早的提交。

--date-order

尽可能按日期排序提交。

--merge

在尝试合并带有冲突的停止之后,在两个分支(即 HEAD 和 MERGE_HEAD )之间显示修改冲突文件并且不存在于合并的所有头上的历史提交。

--left-right

标记可以从中提交提交的对称差异的哪一侧。左侧的提交前面带有一个<符号,右侧带有>符号。

--full-history

过滤历史记录时<path>…,不会删除一些历史记录。(有关更详细的解释,请参阅 git-log [1] 中的“历史简化”。)

--simplify-merges

附加选项可--full-history从结果历史记录中删除一些不必要的合并,因为没有选定的提交对此合并作出贡献。(有关更详细的解释,请参阅 git-log [1] 中的“历史简化”。)

--ancestry-path

当给定一系列提交显示(例如commit1..commit2commit2 ^commit1)时,只显示直接存在于commit1和之间的祖先链上的commit2提交,即提交都是后代commit1,以及祖先commit2。(有关更详细的解释,请参阅 git-log [1] 中的“历史简化”。)

-L<start>,<end>:<file>   -L:<funcname>:<file>

跟踪由 <file> 中的 “<start>,<end>”(或函数名称 regex <funcname> )给出的行范围的演变。您不可以提供任何路径限制器。这目前仅限于从单一修订开始,也就是说,您可能只给出零个或一个正面修订参数。您可以多次指定此选项。

注意: gitk(不像 git-log [1] )当前只理解这个选项,如果你用它的参数指定它“粘在一起”。难道不是后加一个空格-L

<start> 和 <end> 可以采取以下形式之一:

  • 数字如果 <start> 或 <end> 是一个数字,它将指定一个绝对行号(行数从1开始)。

  • / regex /此表单将使用与给定的 POSIX 正则表达式匹配的第一行。如果 <start> 是一个正则表达式,它将从前一个-L范围的末尾(如果有的话)开始搜索,否则从文件起始处开始搜索。如果 <start> 是“^ / regex /”,它将从文件开头搜索。如果 <end> 是一个正则表达式,它将从 <start> 给出的行开始搜索。

  • + offset 或 -offset 这仅对 <end> 有效,并将在 <start> 给出的行之前或之后指定行数。

如果给出“:<funcname>”来代替 <start> 和 <end> ,它是一个正则表达式,表示从匹配 <funcname> 的第一个 funcname 行到下一个 funcname 行的范围。“:<funcname>”从上一个-L范围的末尾(如果有)搜索,否则从文件开头搜索。“^:<funcname>”从文件开头搜索。

<revision range>

限制修改显示。这可以是单个修订版的含义,从给定的修订版本开始显示,也可以是“ <from>.. <to>” 格式的范围,以显示所有修订版本之间的<from>返回<to>。请注意,可以应用更高级的修订选择。有关拼写对象名称的更完整列表,请参阅 gitrevisions [7] 。

<path>…

限制提交给定路径中的文件。请注意,为避免版本名称出现歧义,请使用“ - ”将路径与前面的选项分开。

特定于 gitk 的选项

--argscmd=<command>

gitk 必须确定要显示的修订范围时才运行命令。预计该命令将在其标准输出上打印一份附加修订清单,每行一个。使用它而不是显式地指定一个<revision range>提交的集合是否可以在刷新之间变化。

--select-commit=<ref>

加载图形后选择指定的提交。默认行为等同于指定--select-commit=HEAD

例子

gitk v2.6.12 .. include / scsi drivers / scsi

显示更改版本后v2.6.12更改 include / scsi 或 drivers / scsi 子目录中的任何文件的更改

gitk --since="2 weeks ago" -- gitk

在过去的两周内向文件显示更改gitk。“ - ”是避免与名称gitk分支混淆的必要条件

gitk --max-count=100 --all -- Makefile

最多显示100个对该文件所做的更改Makefile。而不是只查找所有分支中当前分支的变化。

文件

用户配置和首选项存储在:

  • $XDG_CONFIG_HOME/git/gitk 如果它存在,否则

  • $HOME/.gitk 如果存在

如果上述都不存在,则$XDG_CONFIG_HOME/git/gitk默认情况下会创建并使用它。如果$XDG_CONFIG_HOME未设置,则默认为$HOME/.config所有情况。

History

Gitk 是第一个图形资源库浏览器。它是用 tcl / tk 编写的。

gitk 实际上是作为一个独立的项目来维护的,但为了方便最终用户,稳定版本作为 Git 套件的一部分进行分发。

gitk-git /来自 Paul Mackerras 的 gitk 项目:

git://ozlabs.org/~paulus/gitk
上一篇: 下一篇: