Fix for Git Warning: No merge candidate found because value of config option

Home » Blog » Code » Fix for Git Warning: No merge candidate found because value of config option

Found myself a dealing with a Git message that took me quite a bit of time to solve, so I figured I’d post it here real quick in case anyone else needs it as bad as I did:

The warning that I got was this one:

Warning: No merge candidate found because value of config option
         "branch.master.merge" does not match any remote branch fetched.

Basically this stopped me from doing a proper git pull on a server I was working on. The solution ended up being a few lines that needed to be added to the Git config file. Just add the following command in your terminal and that should do the trick:

$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master

Hope this helps you as much as it did me 😉

First name
This field is for validation purposes and should be left unchanged.

Automatically sent to your inbox 🪄 

Leave a Reply

Your email address will not be published. Required fields are marked *