0
0

More than 1 year has passed since last update.

いかん、git rebase -iでコミットを削除しすぎてしまった。特定のコミットを復活させたいとき

Posted at

rebase -iで、一気にdropにして、必要なコミットも削除してしまった

git rebase -i <commit>

そんなときは、

編集の覚えがあるファイルを思い出して、reflogから引っ掛ける

reflogを見て、必要なコミットがわかればOK

git reflog --name-status --date=local

コミットをローカルブランチに適用する

git rebase -i <commit>
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