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 1 year has passed since last update.

error: You have not concluded your mergeの対処法

Posted at

現在のブランチを最新にしようとpullした時に起きたエラーです。

エラー内容

$ git pull
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.

原因

コミットしていないマージがあるから。

メッセージの和訳↓

エラー:マージが完了していません(MERGE_HEADが存在します)。
ヒント:マージする前に変更をコミットしてください。

解決

マージをリセットすれば大体なんとかなります笑

①マージをリセット↓

$ git reset --merge

②プルからやり直す

# プルする
$ git pull
hint: Waiting for your editor to close the file... error: There was a problem with the editor '"C:\apps\Sublime Text 3\sublime_text.exe" -w'.
Not committing merge; use 'git commit' to complete the merge.

# コミットする(コミットが必要だと書いてあるため)
$ git commit
On branch feature/braname
Your branch is ahead of 'origin/feature/braname' by 2 commits.

# プッシュする
$ git push
Enumerating objects: 18, done.
Counting objects: 100% (14/14), done.

参考:

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?