0

I'm trying to push into my repo for the first time and I did :

git init

git add .

git commit -m "first commit "

git push origin master

but it's cause an error :

PS D:\advSWE_assi7 (2)\advSWE_assi75\Exception-and-logging> git push origin master

error: src refspec master does not match any

error: failed to push some refs to 

how can I fix it ?

Sara BB
  • 17
  • 6
  • 1
    You probably did not name your branch `master`; read *all* the answers at the duplicate, paying particular attention to those that have you run `git branch` to list your local branch names. – torek Dec 01 '21 at 17:49
  • It's not clear what the remote is set to from your commands, but from the error message I think @torek is right. You probably have `main` instead of `master`. – TTT Dec 01 '21 at 20:22

0 Answers0