Skip to main content
3 of 4
[Edit removed during grace period]
Deekshith Anand
  • 2.8k
  • 2
  • 25
  • 29

Short answer: This error means the branch you want to push in remote doesn't exist!

In my case, starting from October-2020, the repos created since then had the main branch instead of the previous master branch. So all I had to do this:

git push -u origin main 
  • 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!

Deekshith Anand
  • 2.8k
  • 2
  • 25
  • 29