0
2

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 1 year has passed since last update.

【Git】git stashのメモ

Last updated at Posted at 2022-07-10

一時退避させる

# saveは省略可能
git stash save
git stash 

# 任意メッセージを加えてsaveする
git stash save "hoge"

未追跡のファイルも含めて全てスタッシュ

git stash -u

保存されているスタッシュを一覧表示する

git stash list

N番目のスタッシュを適用し、残す

# NはN番目
git stash apply stash@{N}

N番目のスタッシュを削除

# NはN番目
git stash drop stash@{N}

N番目にスタッシュしたファイルを表示する

# NはN番目
git stash show stash@{N}

N番目にスタッシュしたファイルごとの変更内容を表示する

# NはN番目
git stash show -p stash@{N}

スタッシュを全削除する

git stash clear
0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?