3
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 5 years have passed since last update.

ぎゃー!変更を破棄しちゃったー!でもstashしてた!の件

Posted at

↓スーパー便利

〜復活手順〜
①行目:候補のsha1(commit id)がいくつか出てきます(stashだけじゃないのかも?)
②行目:それらのsha1の内容を確認していき、復活させたい変更を見つけ出します(多いと大変…)
③行目:取り込みたい変更が見つかったら、cherry-pickでブランチに反映させます

 git fsck | awk '/dangling commit/ {print $3}'
 git show --summary 候補のsha1
 git cherry-pick -n -m1 取り込みたい履歴のsha1
3
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
3
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?