Help Center/ CodeArts Repo/ FAQs/ Uploading and Downloading Code/ Error "Merge branch 'master' of https://test.com Please Enter a commit" Is Reported When Pulling Code Using the Git Pull Command
Updated on 2024-11-14 GMT+08:00

Error "Merge branch 'master' of https://test.com Please Enter a commit" Is Reported When Pulling Code Using the Git Pull Command

Symptom

Error Merge branch 'master' of https://test.com Please enter a commit message to explain why this merge is necessary... is reported when pulling code using the git pull command, as shown in the following figure.

Figure 1 Error message

Analysis

The code in CodeArts Repo is different from the code in your local repository. Therefore, when git pull is executed, the remote code will be merged to the local code. The dialog box displayed asks if you confirm the merge, and prompts you to enter a commit message.

Solution

Go to the local repository directory and run the following command in Git Bash:

  1. Cancel the merge.

    git merge --abort

  2. Merge the master branch of the remote repository (origin) to the current branch:

    git merge origin/master