Git树与终端中的可选节点? [英] Git tree with selectable nodes in terminal?
问题描述
有没有类似的git,可以在Terminal而不是Emacs)。
因此,在一个git项目中,我可以输入一个命令并显示该树。我可以在指针前后移动,甚至切换到另一个分支,然后按回车键,它将检出特定提交的整个状态。
As @ NevikRehnel说,
tig
是你的朋友。 tig --all
以树形式显示您的完整日志(如 git log
的 - 图
开关)。
tig log view http://i48.tinypic.com/f9pkef.png
使用上下键进行提交时,您可以用 Enter 看到所选提交的 git show
kbd> Shift + C 用于执行该提交的 git cherry-pick
。
tig show view http://i47.tinypic.com/i4ix6e.png
您可以随时按 H 以查看帮助。
tig帮助视图http:/ / /i45.tinypic.com/25ahu0m.png
您可以检出分支,但您也可以添加自定义绑定用于执行 git checkout
。
我认为 man tigrc
足以了解如何。
Emacs has an optional undo-tree. You can cursor to each node, and hit return to go back in time, even along branches.
Is there something similar for git, which can be accessed within the Terminal (not Emacs). So, within a git project, I could type a command and it would show the tree. I could cursor around, going back in time or even switching to another branch, then hit return and it would checkout that particular commit's whole state.
As @NevikRehnel said, tig
is your friend.
tig --all
shows you your complete log in a tree form (as git log
's --graph
switch).
tig log view http://i48.tinypic.com/f9pkef.png
You move between commits with up and down keys, you see a git show
of the selected commit with Enter, and you can hit Shift + C for doing git cherry-pick
of that commit.
tig show view http://i47.tinypic.com/i4ix6e.png
You can press H anytime to see help.
tig help view http://i45.tinypic.com/25ahu0m.png
You can checkout branches, but you can too add custom bindings for doing git checkout
.
I think man tigrc
would be enough to understand how.
这篇关于Git树与终端中的可选节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!