0

I have run into a error while trying to Push to my repository.

I am fairly new to this so any help will be very welcome. The error occurs when I Push my master branch, the loading bar goes red and part of the error message states:

" ![rejected] master->master(non-fast-forward)
error:failed to push refs to 'https://...my_path.git' "

I have tried to attach an image by I was unable to so I supplied a link to the image1 if the error message isn't sufficient.

Thanks in advance

  • 1
    The important part in your question is the hint given in the image you uploaded. Could you please attach it as a text or `code text` here so anybody in this question can easily see the problem (and so that it may help others as well) – tryman May 05 '20 at 10:17
  • Thanks tryman, the hits given in the error message can be seen below: 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. – David Biggs May 05 '20 at 10:43
  • https://stackoverflow.com/search?q=%5Bgit%5D+Updates+were+rejected+because+the+tip+of+your+current+branch+is+behind – phd May 05 '20 at 12:56

1 Answers1

0

The master branch you're pushing to has changed. You need to synch your local repo with the remote first then you can push your changes to it.

You need to run git pull origin master first.

M.Z.
  • 424
  • 5
  • 12