0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Powershellでgit stash showすると「Too many revisions specified: 'stash@' 'MAA=' 'xml' 'text'」と表示される

Last updated at Posted at 2021-09-12

Gitのstash内容を表示しようとすると「Too many revisions specified: 'stash@' 'MAA=' 'xml' 'text'」とエラーが表示されます。

> git stash show stash@{0}
Too many revisions specified: 'stash@' 'MAA=' 'xml' 'text'

原因は{}が構文解析されているためです。
stash名を文字列扱いとさせれば正常に動きます。gitの問題ではなくpowershellの問題です。
解決方法は3つあります。

1.エスケープする。

git stash show stash@`{1`}

2.文字列にする。

git stash show "stash@{1}"

3.構文解析対象外にする。
about_Special_Characters Stop-parsing token (--%)

git --% stash show stash@{0}
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?