master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:abc70/new.git'

+1 vote

Hi,

I am getting the below error when trying to push data from local to GitHub. How can I solve this error?

! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:abc70/new.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.

Feb 14 in Git & GitHub by akhtar
• 10,150 points
1,325 views

1 answer to this question.

0 votes

Hi@akhtar,

To update your local repo to GitHub you used git push. But if there any changes in GitHub for that you have to fetch data and after that you have to pull data from GitHub. You can use the below command before using push command.

$ git fetch

$ git pull origin master
answered Feb 14 by MD
• 22,020 points

Related Questions In Git & GitHub

0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,370 points
177 views
0 votes
1 answer

Error: git pull fails “unable to resolve reference” “unable to update local ref”

This happens when there are unnecessary files ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 9,940 points
4,533 views
0 votes
1 answer

git error: RPC failed; curl 56 GnuTLS recv error

This is simple, you’re probably missing openssl ...READ MORE

answered Sep 26, 2018 in Git & GitHub by Tyrion anex
• 8,370 points
2,776 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
488 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer