I'm trying to upload a new project to Github. I created the repository and git bashed on the repository folder. But when I use these two commands I get the following errors:
git commit -m "first commit"
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
git push -u origin main
error: src refspec main does not match any
error: failed to push some refs to 'repolink.git'
I tried that command: git push --set-upstream origin main
I got the same error:
error: src refspec main does not match any
error: failed to push some refs to 'repolink.git'
How can I fix this problem? What am I doing wrong? Thanks in advance...
-----UPDATE-----
I tried the answer in the following question: Nothing to commit - Git
And it worked! Thank you all...