Short answer: This error means the branch you want to push in remote doesn't exist!This error means the branch you want to push in remote doesn't exist!
In my case, starting from October-2020 2020, the reposrepositories created since then had the mainmain branch instead of the previous mastermaster branch. So all I had to do was this:
git push -u origin main - you may skip -u flag if the upstream is set( Like in case you had cloned it already)
You may skip -u flag if the upstream is set (like in case you had cloned it already).
Bingo! That worked for me! Hope that helps! Happy coding!