1

First, I created a repository on github that is obviously empty. Then I initiated a git bash terminal in my working directory. Once I do that, I'm using the following code to push my files to the github repository:

git init
git add .
git commit -m "my commit"
git remote set-url origin git@github.com:username/repo.git
git push origin master

When I run git push origin master, I get the following error:

error: src refspec master does not match any.
error: failed to push some refs to 'git@github.com:/madsthaks/AdTrackingFraudDetection.git'

I'm not very comfortable with git so I'm having a bit of trouble with this. Any help would be much appreciated.

madsthaks
  • 2,091
  • 6
  • 25
  • 46

1 Answers1

0

try

git init
echo. readme>README.md
git add .
git commit -am "Initial Commit"
git remote add origin https://github.com/madsthaks/AdTrackingFraudDetection
git push --set-upstream origin master
Stamos
  • 3,938
  • 1
  • 22
  • 48