Level 60
do you have any files in your folder?
run
git log
check if you have some commits, if not, then add a file or something, and start from git add ., then commit, then push
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I did that
git init
git add .
git commit -m "initial commit"
git remote add origin https://github.com/d/site.git
git push -u origin master
error
git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/d/site.git'
and thank you
do you have any branches set up on your remote? you may find that you have a remote branch called main and are trying to push up master (which doesnt exist).
i would empty your local directory, checkout your remote branch, add your files and push up that way.
Please or to participate in this conversation.