Skip to main content
Active reading. Expanded. Removed unnecessary formatting - overformatting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare). Removed meta information (this belongs in comments).
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

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!

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!

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

In my case, starting from October 2020, the repositories created since then had the main branch instead of the previous master 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).

Bingo! That worked for me!

[Edit removed during grace period]
Source Link
Deekshith Anand
  • 2.8k
  • 2
  • 25
  • 29
added 182 characters in body
Source Link
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!

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 origin main   

Bingo! That worked for me! Hope that helps! Happy coding!

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!

Source Link
Deekshith Anand
  • 2.8k
  • 2
  • 25
  • 29
Loading