Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

failed to push some refs -tip of your current branch is behind its remote counterpart

Tags:

github

I tried to push a file ("HelloWorld.md") on my local repository to remote repository on hithub. I got the following error message. How do I remove this error?

error: failed to push some refs to 'https://github.com/kriaz100/DataScienceCours era.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

like image 250
Khalid Riaz Avatar asked Oct 26 '25 05:10

Khalid Riaz


1 Answers

git pull --rebase 
git push origin master

The rebase will apply your changes after those already to the remote (online website). This video literally goes over your exact issue and solves it using git pull --rebase https://youtu.be/IhkvMPE9Jxs?t=10m36s

like image 185
Michael James Kali Galarnyk Avatar answered Oct 28 '25 03:10

Michael James Kali Galarnyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!