-2

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.

cva6
  • 325
  • 7
  • 15
  • And what seems to be the problem with the message? Can you emphasize which part is unclear to you? – Romain Valeri Oct 10 '18 at 20:02
  • Possible duplicate of [How to resolve git error: "Updates were rejected because the tip of your current branch is behind"](https://stackoverflow.com/questions/22532943/how-to-resolve-git-error-updates-were-rejected-because-the-tip-of-your-current) – phd Oct 10 '18 at 21:44
  • https://stackoverflow.com/search?q=%5Bgit%5D+Updates+were+rejected+because+the+tip+of+your+current+branch+is+behind – phd Oct 10 '18 at 21:44

1 Answers1

0

if you are seeing similar message REPOSITORY - your repository name and your USERNAME and assuming master is current branch

$ git push origin master
To https://github.com/USERNAME/REPOSITORY.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/USERNAME/REPOSITORY.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

Then, you can do following:

someone pushed new commits between your last git fetch and git push. In this case you need to repeat your steps and rebase master one more time.

git fetch
git rebase master
git push origin master
Nisarg
  • 1,631
  • 6
  • 19
  • 31