简体   繁体   English

没有Tig的情况下如何浏览Git日志?

[英]How can I browse Git Logs without Tig?

I have a new server provider and they have no tig installed, I am pretty sure the guys have some good reasons for that. 我有一个新的服务器提供程序,没有安装tig,我很确定这些人有很好的理由。 How do you browse git logs without tig? 如何在没有tig的情况下浏览git日志?

Not really what I am looking for: 并不是我要找的东西:

  1. $ git log --graph --color --oneline --all --decorate # how can I browse things with this? $ git log --graph --color --oneline --all --decorate #我如何浏览这个东西?

  2. $ git log -p # more like diff-less -combo, not really browsing. $ git log -p #更像diff-less -combo,不是真正的浏览。

  3. $ gitk # I am on console, although I could sshfs things but I want to browse things like with tig $ gitk #我在控制台上,虽然我可以用sshfs进行操作,但是我想用tig浏览

您可以尝试一下,我的个人配置alias.lp

git log --graph --pretty=format:'%Cgreen%h%Creset -%C(yellow)%d%Creset %s %Cred(%cr)%Creset%C(yellow)<%an>'

The output of the git log will be passed through less which will allow you to go up and down to view earlier or later history. git log的输出将通过less路径传递,这将允许您上下查看早期或以后的历史记录。 less has a lot of functionality such as searching for certain strings, etc: http://unixhelp.ed.ac.uk/CGI/man-cgi?less less具有许多功能,例如搜索某些字符串等: http : //unixhelp.ed.ac.uk/CGI/man-cgi? less

You should be able to use gitk --all to see everything as well. 您应该也可以使用gitk --all来查看所有内容。

From what you've said, I'd suggest one of these: 根据您的意见,我建议其中之一:

  1. git clone (maybe with --mirror) then just use tig. git clone(也许带有--mirror),然后只使用tig。 Advantages: it's all local, tig will be fast. 优点:全是本地的,tig会很快。 Disadvantages: you have to keep your mirror copy up-to-date. 缺点:您必须保持镜像副本为最新。
  2. sshfs, then just use tig. sshfs,然后只需使用tig。 Advantages: you are using your local tig, configured exactly how you want it, directly on the remote repository. 优点:您正在直接在远程存储库上使用本地tig,并对其进行了精确配置。 Disadvantages: it might run a bit slow depending on sshfs network performance & caching. 缺点:根据sshfs的网络性能和缓存,它的运行速度可能会有些慢。

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

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