0

When I run the command

git push -u origin master

it returns the following:

error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/cistuff/MaxGames.git'

When I run the command

git push -u origin main

it returns the following:

Everything up-to-date
Branch 'main' set up to track remote branch 'main' from 'origin'.

I tried git push -u origin master and git push -u origin main but I ended up with the errors above. This is my first time doing this so I am very confused.

max
  • 1
  • Okey, check this post over here. https://stackoverflow.com/questions/18137175/in-git-what-is-the-difference-between-origin-master-vs-origin-master Maybe it helps. – Rafael Moreira Nov 22 '22 at 22:46

1 Answers1

0

I would recommend you to check this answer first. You can check your git repository status with the command

git status

Probably, you have a master branch locally and try to push it to GitHub which they replaced master with a branch called "main". So you might need to use this command in your master branch

git branch -M main

Here you can use this git command cheat sheet.