I am trying to push code to my remote Github account using git push origin master command but it didn't work. The error display as src refspec master does not match any but when I used git push origin main the code push to the git account. I don't understand what are the differences between these command how can I resolve this problem?
2 Answers
0
votes
When you are creating a repository check what is the default branch name and then use that name when you are push cord into the main branch if your push into another branch used that name. if default branch name "master" used command git push origin master and if you have another branch name like "sub-one" used that name to if you want to push your cord into that branch git push origin sub-one