- git error
error: failed to push some refs to 'https://naranja0047:ghp_SSHKEY@github.com/illunex/ABCfood_recommendation.git'
- Cause
Without commit after remote remove, I tried to push.
$ git remote remove origin
$ git remote add origin https://naranja0047:ghp_SSHKEY@github.com/illunex/ABCfood_recommendation.git
$ git push -u origin master
>>>
error: src refspec master does not match any
error: failed to push some refs to 'https://naranja0047:ghp_SSHKEY@github.com/illunex/ABCfood_recommendation.git'
- Solution
git add -> git commit -> git push
$ git add .
$ git status
>>>
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .gitignore
new file: requirements.txt
...
$ git commit -m "first commit"
$ git push origin master
'Git' 카테고리의 다른 글
Add my code to my teammate's code using git branch (0) | 2022.07.12 |
---|---|
Push files to github with Personal access tokens (0) | 2022.06.15 |
git error : Permission denied (publickey) (0) | 2022.04.06 |
git error : Updates were rejected because the tip of your current branch is behind (0) | 2021.11.18 |
init, add, commit, checkout, branch, push, pull request, pull, logs, fetch (0) | 2021.06.13 |