SourceTree で rebase してコンフリクト解決してすぐコミットしてしまったとき
上記の記事を参考にして、rebase -> コンフリクトの解決をしてたんですが、
特に手順5の後にコミットメッセージを入力してコミットしてしまうというミスを犯しやすいので注意が必要です。
これをやってしまいました。
SoureceTree からの解決方法が分からなかったので、コマンドから rebase を無かったことにしました。
1.コマンドで確認
$ git status On branch fix-branch You are currently rebasing branch 'fix-branch' on 'e114a18'. (all conflicts fixed: run "git rebase --continue") nothing to commit, working tree clean
2.rebase中でコンフリクト解消したから、git rebase --continue
を実行してみる。
$ git rebase --continue Applying: コメント No changes - did you forget to use 'git add'? If there is nothing left to stage, chances are that something else already introduced the same changes; you might want to skip this patch. When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort".
3.対応方法がよく分からなかったので、rebase を無かったことにしようと git rebase --abort
を実行。
rebase 中止して最初からやり直しました。