HOW TO FIX: error: failed to push some refs to | Create Remote GitHub Repository in 2 Minutes

Brandon Colchin
Brandon Colchin
162.7 هزار بار بازدید - 6 سال پیش - ~~List of commands I use
~~List of commands I use in the video~~
$ cd YourDirectory
$ git init
$ git remote add origin YourRemoteRepositoryURL
$ git add -A
$ git commit -m "YourMessage"

If "git add -A" does not work then try "git add ." or "git add filename".
You can check the official documentation here: https://git-scm.com/docs/git-add

If these don't work then please read the error completely as the output may give you a hint as to what command you need to run. For example:
"error: failed to push some refs to 'https://github.com/myaccountname/the-...
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again."

This means ☝️ that you need to run the command "git pull".

If none of these work then try this forum post: https://stackoverflow.com/questions/2...
6 سال پیش در تاریخ 1397/03/30 منتشر شده است.
162,786 بـار بازدید شده
... بیشتر