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

preview_player
Показать описание
~~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".

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:
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".

Рекомендации по теме
Комментарии
Автор

I have this issue right now and although on the video works on my Gitbash does not! I still see the same error message and this is even doing all the steps on this video!

oscaranillo
Автор

Yay thanks! Tutorial I was watching completely skipped all of this - some tutorials seem to think we are clairvoyant. Thanks again for this - saved me a lot of time.

apositron
Автор

Thank you so much! I was stuck with this error for so many months, until I found out the `git push -u origin main` command.

Ritika-Das
Автор

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?

arpitsrivstva
Автор

Great job! This one was bugging me for several months

belugabibletranslations
Автор

5 years later and this helped me Thanks man

Mumusshkka
Автор

Please help.
After I double click the setup file of GIT 2.27.0 it says "unable to get system config" and "could not read

akashjoshi
Автор

error: pathspec 'commit'' did not match any file(s) known to git why?

plugaruCacealin
Автор

Thanks Dude! I was having issue pushing but this video helped

bijju
Автор

Thank you so much, i finnally uploaded it in github..
I keep encountering other problems in other tutorials i see in youtube

allenjoshua
Автор

Thanks a lot man, finally I learned how to solve this problem :)

anikbarua
Автор

I'm having a issues with Cloning my GitHub repo in my Ubuntu, can't push anything. Err is: Fatal: unable to access 'githublink': Failed to connect to 127.0... port 1080: connection refused
How can I solve it, please help me. Thanks.

UniverseGames
Автор

Great tutorial! Thank you! May I ask why I get error with git push -u origin main?

handiprepper
Автор

After 1 year still this is the only video which solves the problem

Turkay
Автор

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

annache
Автор

Have been trying for 2 hours to do this thanks a lot dude

adityamathur
Автор

Thanks for help us. Nice Video and Tutorial.

leonardodossantos
Автор

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

imsoserious
Автор

Thanks! I always forget the git add when I start a repository.

sergi
Автор

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

diegojavb