LoginSignup
0
0

More than 1 year has passed since last update.

Git rebaseを実施したらなんかエラーが出た 個人メモ

Posted at

目的

  • $ git rebase実行後にコンフリクトエラーが出たときの解決方法をメモ的にまとめる

情報

  • $ git rebaseを実行したら下記のエラーがでた。

    $ git rebase master
    Auto-merging コンフリクトファイル名
    CONFLICT (content): Merge conflict in コンフリクトファイル名
    error: could not apply コミットID... コミットメッセージ
    Resolve all conflicts manually, mark them as resolved with
    "git add/rm <conflicted_files>", then run "git rebase --continue".
    You can instead skip this commit: run "git rebase --skip".
    To abort and get back to the state before "git rebase", run "git rebase --abort".
    
  • 雑に翻訳してみた。

    $ git rebase master
    自動マージコンフリクトファイル名
    CONFLICT(コンテンツ):コンフリクトファイル名で競合をマージ
    エラー:ダウンロードIDを適用できませんでした...
    すべての競合を手動で解決し、解決済みとしてマークします
    「gitadd / rm <conflicted_files>」を実行してから、「gitrebase--continue」を実行します。
    代わりに、このコミットをスキップできます。「gitrebase--skip」を実行します。
    中止して「gitrebase」の前の状態に戻すには、「gitrebase--abort」を実行します。
    
  • 「rebaseを実施したらコンフリクトしたよ。なんとかしてね。」って感じのことを言われているっぽい。

解決方法

  1. 下記コマンドを実行する。

    $ git status
    
  2. ステージングされていないファイルを開き、コンフリクトを解消する。

  3. 下記コマンドを実行してコンフリクト解消したファイルをステージングする。

    $ git add コンフリクト解消したファイル
    
  4. 下記コマンドを実行してコミットする。エディタが開くが特にコミットメッセージは記載せずに保存する。

    $ git commit
    
  5. 下記コマンドを実行してrebaseを再度実行する。

    $ git rebase --continue
    
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