How do I resolve this issue? I am trying to commit but I get the below error.
git push origin monty_svm_dev
To git@github.com: ! [rejected] monty_svm_dev -> monty_svm_dev
(non-fast-forward) error: failed to push some refs to
'git@github.com:/mygit.git' To prevent you from losing history,
non-fast-forward updates were rejected Merge the remote changes before
pushing again. See the 'Note about fast-forwards' section of 'git
push --help' for details. root@li409-202:~/mypath#
do
git pull origin monty_svm_devfirstWhat has happened is that the remote has more recent changes than your branch.
So before you can
pushyour changes, you need to get and merge the changes on the remote first.You can do this either by doing a
git checkout your_branch, then:git fetch origin your_branchand then agit merge your_branchor
Where your branch is master, or your branch name (seems to be
monty_svm_devin your case I think)Once this is done (and any conflicts resolved) you can do a
git push origin monty_svm_dev