简体   繁体   English

可以对不同分支的Tig颜色提交有何不同?

[英]Can Tig color commits of different branches differently?

In tig, I find it often hard to find out which commit belongs to which branch. 在tig中,我发现通常很难找出哪个提交属于哪个分支。 In gitk, this is much more easier. 在gitk中,这更容易。 I think this is because of two things. 我认为这是因为两件事。 Firstly, gitk colors the branches differently (I mean the lines between commits) and secondly, it seems that the commits are sometimes place in a different "columns" (see pictures, btw git log --graph draws branches like tig). 首先,gitk以不同的方式对分支进行着色(我的意思是提交之间的界限),其次,似乎提交有时会放在不同的“列”中(参见图片,btw git log --graph绘制像git log --graph分支)。

Is there a way to color the blue stars or the pink lines drawn for each branch? 有没有办法为每个分支的蓝色星星或粉红色线条着色?

Gitk

TIG

Yes, tig shows the branch lines with different colors since version 2.0. 是的,tig显示自2.0版以来具有不同颜色的分支线。 Due to limitations in how lines can be drawn using text, a commit graph rendered in tig is often less compact than gitk. 由于如何使用文本绘制线条的限制,在tig中呈现的提交图形通常不如gitk紧凑。 Compared to tig, gitk also uses other ways to reduce the "horizontal" width of the commit graph such as simply hiding branch lines in parts of the graph when they have no commits. 与tig相比,gitk还使用其他方法来减少提交图的“水平”宽度,例如在没有提交时简单地将分支线隐藏在图形的某些部分中。

The color of the commit "nodes" can be configured in tigrc by setting the graph-commit color. 可以通过设置graph-commit颜色在tigrc配置提交“节点”的颜色。 Example: 例:

color graph-commit green default

彩色提交图的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM