rejected master - master fetch first error failed to push some refs to git github com abc70 new git

+2 votes

Hi,

I am getting the below error when trying to push data from local to GitHub.

! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:abc70/new.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.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Thank You

Feb 14, 2020 in Git & GitHub by akhtar
• 38,260 points
69,091 views
git push origin master --force
Thanks it worked !!

3 answers to this question.

+6 votes
Best answer
git push origin master --force
I met the same issue and this works for me
answered Apr 29, 2020 by anonymous

selected Nov 13, 2020 by MD
worked well thankyou
thanks worked really good
Great ! it's work ....Thanks
git push origin main --force
This work well for me.
thank you........ It worked for me
0 votes