posted by qubix on October 18, 2018

Well I had created my new repo, made the files I wanted and when I tried to push them:

error: src refspec master does not match any.

BUT...I have not committed anything yet oops!

So the correct order is:

Create my new shiny git repo

mkdir repo && cd repo
git remote add origin /path/to/origin.git

Add the files I want

git add . 

Commit the changes

git commit -m "initial commit"

Then push them!

git push origin master