在git日志中显示所有存储 [英] Show all stashes in git log

查看:211
本文介绍了在git日志中显示所有存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看git log输出中的所有存储.有人知道有没有办法做到这一点?

I would like to see all stashes in git log output. Does anyone know if there is a way to do that?

我想记录所有提交.我使用命令

I want to log all commits. I use the command

git log --date-order --all

但是它只返回最高级的存储.我希望看到代表其他存储的提交.

But it returns only the top most stash. I would like to see commits that represent other stashes.

推荐答案

我来到这里的目的与@jbialobr相同,在阅读了前面的答案并做了以下工作后,我做了一些进一步的挖掘.

I came here looking to do the same as @jbialobr, I did some more digging after reading the previous answers and came up with the below.

@msmt的答案为您提供了存储的日志,您可以使用它来获取要在git日志中使用的哈希.

@msmt's answer gives you a log of the stashes, and you can use this to get the hashes to use in the git log.

git reflog show --format="%h" stash仅给您所有隐藏的哈希,然后可以将它们传递给git log命令,例如

git reflog show --format="%h" stash gives you just the hashes of all stashes which can then be passed to a git log command such as

git log --date-order --all $(git reflog show --format="%h" stash)

我现在正在使用的完整命令是

The full command I personally am now using is

git log --oneline --graph --decorate --all $(git reflog show --format="%h" stash)

在centos的git版本2.5.1上测试

Tested on git version 2.5.1 on centos

这篇关于在git日志中显示所有存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆