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

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

Brandon Colchin

5 лет назад

162,640 Просмотров

~~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-repo.git'
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/24114676/git-error-failed-to-push-some-refs-to

Тэги:

#MigetBean #git #github #remote #repository #local #fast_easy #2_minutes #2min #failed_to_push #error
Ссылки и html тэги не поддерживаются


Комментарии:

J Vitor Ataíde
J Vitor Ataíde - 30.10.2023 16:19

The better!!!

Ответить
Ahmed Emad
Ahmed Emad - 15.08.2023 09:20

thanks 😭😭😭😭

Ответить
CHOCOLATE
CHOCOLATE - 15.04.2023 02:15

Finaaaalllyy thank you maaan

Ответить
Anna Che
Anna Che - 17.03.2023 07:24

Thanks for the clear explanation. I did everything like in the video. And upload the files to the remote repository 😀

Ответить
Bogdan Constantin
Bogdan Constantin - 16.03.2023 22:23

don't work

Ответить
Diego Bacuy
Diego Bacuy - 19.02.2023 00:37

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet

Ответить
Ami Thakkar
Ami Thakkar - 06.02.2023 11:58

Great. thanks. helpful to me

Ответить
Lucas
Lucas - 16.01.2023 04:37

Thanks a lot mate!

Ответить
Liam Performance713
Liam Performance713 - 04.01.2023 13:51

this help alot

Ответить
Bethlehem Lemma
Bethlehem Lemma - 13.12.2022 17:18

ohhh God!! you're a life saver

Ответить
Isidro Gallardo
Isidro Gallardo - 05.12.2022 06:39

Hola Brandon, muchas gracias.
Tu contenido es actual.

Ответить
Gary Thompson
Gary Thompson - 13.11.2022 18:10

What a Goat!!!

Ответить
Arpit Srivastava
Arpit Srivastava - 29.10.2022 00:09

I have to disable lfs check in github as it's not pushing some of my files and saying that they are corrupt and all. I read that I could disable it by this command : 'git config lfs.allowincompletepush true' , but where do I write it or execute it?

Ответить
Carlos Rivera
Carlos Rivera - 22.09.2022 00:08

Thank you so much for your help!! This was very helpful!

Ответить
ankit Mehrotra
ankit Mehrotra - 14.09.2022 19:28

You are Awesome <3

Ответить
Federico Lombardi
Federico Lombardi - 02.09.2022 00:44

graciasssss!

Ответить
Berna Uysal
Berna Uysal - 11.08.2022 20:19

Thank you sooo much!!

Ответить
Arthur Soares
Arthur Soares - 02.08.2022 16:00

Thanks guy , you helped me a lot

Ответить
EA
EA - 31.07.2022 11:44

Thanks bro for this video!!

Ответить
Rakesh Mondal
Rakesh Mondal - 30.06.2022 09:49

Thank you so much! I

Ответить