The file <File name> is not branched in <Project name>

This error has the following cause and solution: