Git src refspec does not match any error

Cloning a branch of a git repository (particularly non master ones) and then pushing your changes to the same can result into this error Resolve src refspec does not match any error This error can be resolved by pushing using…