質問するログイン新規登録

回答編集履歴

1

コマンドを省略

2019/02/12 05:04

投稿

tamoto
tamoto

スコア4346

answer CHANGED
@@ -13,11 +13,9 @@
13
13
  ```sh
14
14
  git checkout yourbranch # stashを適用したいブランチをチェックアウト
15
15
 
16
- git stash list # stash一覧から該当のstashの番号を確認 => stash@{n}
16
+ git stash list # stash一覧から該当のstashを確認 => stash@{n}: WIP on temp: XXXXXXX(コミットID)
17
17
 
18
- git rev-parse stash@{n}~ # 先のstash作成したHEADを特定 => 0a1b2c3d(コミットID)
18
+ git reset --hard XXXXXXX(コミットID) # stash作成時のコミットに移動
19
19
 
20
- git reset --hard 0a1b2c3d(コミットID) # 当該コミットに移動
21
-
22
20
  git stash pop n # stashを適用
23
21
  ```