-1

Hi could any one help me with this GitHub error? I am not getting what I am done wrong.

To https://github..com/kumar/web.git
 ! [rejected]        develop -> develop (fetch first)
error: failed to push some refs to 'https://github..com/kumar/web.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.
Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
Kumar
  • 1

1 Answers1

0

What's going on is the origin server has some commits that you haven't pulled down yet.

I recommend a rebase to resolve this.

Generally you can do:

git fetch origin master
git rebase origin/master
git push origin master

This puts your commits to the top of the branch, after the upstream work that you didn't have before.

willoller
  • 7,106
  • 1
  • 35
  • 63