Cannot push changes to github

In the terminal, I've given the following commands:
git remote add origin REPOSITORY_NAME
git remote add origin REPOSITORY_NAME
git branch -M master
git branch -M master
when i try to push changes using git push -u origin, it said I've to enter git push --set-upstream origin master. When i did, I got this error
error: src refspec master does not match any
error: failed to push some refs to 'REPOSITORY_NAME'
error: src refspec master does not match any
error: failed to push some refs to 'REPOSITORY_NAME'
What is stopping me?
16 Replies
Jochem
Jochem2y ago
first guess would be that there's no master branch on the remote server
Melodium
MelodiumOP2y ago
wdym?
Jochem
Jochem2y ago
what branches exist on the remote repo? (and I assume REMOTE_REPO is just a stand-in you're using for privacy reasons, right? You're using an actual repo URL?) also, what is your local branch called?
Melodium
MelodiumOP2y ago
yes local branch? (please reply with ping on) no, that's the remote for our repo ig it said to give a name for the remote, i gave origin
Melodium
MelodiumOP2y ago
now it says I don't have permissions
Jochem
Jochem2y ago
no permissions means you have to log in probably, at least set your e-mail to something github knows about. Also, if you want pings for threads you're in, you can click the notification bell and set it to "All Messages". @shirochord
Melodium
MelodiumOP2y ago
ok the email is same as my github account
Jochem
Jochem2y ago
sorry, forgot to @ you @shirochord
Melodium
MelodiumOP2y ago
ok np :) i kept this chat open when i push, it says the repo contents are empty
Jochem
Jochem2y ago
did you make any commits? @shirochord
Melodium
MelodiumOP2y ago
ye it says to publish my branch
Jochem
Jochem2y ago
what says to do that?
Melodium
MelodiumOP2y ago
github extension anyways I've shut down my laptop I'll open the project tmrw
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem2y ago
Please ask your question in a new thread
Want results from more Discord servers?
Add your server