Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSpencer Renfro
Courses Plus Student 11,133 Pointsgit push -u not working
this is the message I get when I use git push -u
error: src refspec master does not match any.
error: failed to push some refs to 'git@github.com:rifraf94/medals.git'
Below is the full code I ran if i made errors before the git push -u command.
treehouse:~/workspace$ git init
Reinitialized existing Git repository in /home/treehouse/workspace/.git/
treehouse:~/workspace$ git remote add origin https://github.com/rifraf94/medals.git
fatal: remote origin already exists.
treehouse:~/workspace$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'git@github.com:rifraf94/medals.git'
1 Answer
Georgina Pickworth
11,429 PointsI believe GitHub has replaced the name "master" with "main": https://github.com/github/renaming
Have you tried running your code again using "main" instead of "master"?