“修订太多" git消息 [英] "Too many revisions" git message

查看:105
本文介绍了“修订太多" git消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在git版本1.7.9.5上尝试时

On git version 1.7.9.5, when trying

git stash show -p stash@{"Friday Smarch 13 13:13:13 2013"}

(摘自我收到错误消息

Too many revisions specified: stash@{Friday Smarch 13 13:13:13 2013}

尝试以下操作时,我也会收到相同的错误消息

I also get the same error message when trying the following

git stash show "stash@{Friday Smarch 13 13:13:13 2013}"
git stash show -p stash@{Friday\ Smarch\ 13\ 13:13:13\ 2013}

我不认为逃避是原因.如果我愿意

I don't think escaping is the cause. If I do

git stash show -p stash@{Friday\ Smarch\ 13\ 13:13:13 2013}

然后我得到了另一条错误消息:

Then I get a different error message:

fatal: ambiguous argument 'stash@{Friday Smarch 13 13:13:13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

通过对比,做

git stash show -p stash@{42}

工作.

错误消息是什么意思,我该怎么办?

What does the error message mean, and what should I do?

推荐答案

这无法回答OP的具体情况,但我没有足够的声誉将其添加为评论...此页面是搜索次数最多的页面之一错误消息Too many revisions specified

This does not answer the OP's specific situation but I don't have enough reputation to add this as a comment... This page is one of the top search results for the error message Too many revisions specified

如果您使用的是Posh Git或其他Powershell命令行,则在输入类似以下命令时会收到上述错误消息

If you are using Posh Git or some other powershell command line then you get the above error message when you enter a command like

git stash show -p stash@{2}

Powershell不喜欢花括号.

Powershell doesn't like the curly braces.

git stash show -p stash@'{'2'}'

应该可以解决问题.

类似地:

git stash show -p "stash@{2}" 

也避免了错误.

这篇关于“修订太多" git消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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