0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

#10 stashを削除する

Posted at

はじめに

Gitでのスタッシュ削除操作についてまとめます。

一覧表示

削除する前にスタッシュの内容を一覧表示します。

$ git stash list

そうするとこのように表示されます。

stash@{0}: On feature/xxxxxx/yyyyyy: nameOfStash
stash@{1}: On feature/zzzzzz: nameOfStash
stash@{2}: On feature/zzzzzz: nameOfStash
stash@{3}: On develop: nameOfStash
stash@{4}: On develop: nameOfStash
stash@{5}: On develop: nameOfStash
stash@{6}: On develop: nameOfStash
stash@{7}: On feature/zzzzzz: nameOfStash
stash@{8}: On feature/zzzzzz: nameOfStash
stash@{9}: On feature/zzzzzz: nameOfStash
stash@{10}: On feature/zzzzzz: nameOfStash

個別に削除する

一覧表示されたスタッシュの中から特定のスタッシュを削除する場合は、以下のコマンドを実行します。

$ git stash drop stash@{0}

一括削除する

すべてのスタッシュを一括で削除したい場合は、以下のコマンドを実行します。

$ git stash clear

以上

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?