Git MQL5: push failed with -11 error, reference was not fast-forwardable

 

Hello all developers,

When I try to commit a modified file to storage in MetaEditor, I get the following error: "Git MQL5: push failed with -11 error, reference was not fast-forwardable".

Does anyone know why this is?

 

Did you use Git Push?
Do not use Git Push; use Git Commit instead (post  - machine translation to the English):

Forum on trading, automated trading systems and testing of trading strategies

New MetaTrader 5 platform version build 5100: Switching to Git and MQL5 Algo Forge developer hub, dark theme and interface improvements

Renat Fatkhullin , 2025.05.31 04:14

Git Push is almost never needed in normal circumstances, as there is usually no work for it. It is left in case of failure to push (due to error, force majeure, etc.) commits.

The main tool is Git Commit, which essentially does Add Modified + Commit + Push .


 
Sergey Golubev #:

Did you use Git Push?
Do not use Git Push; use Git Commit instead (post  - machine translation to the English):


Yes, I always use "Git commit".
 




Here's what happened.

 

I use it by right mouse click on the indicator/EAs/any in MetaEditor for Git Commit (I am not using main menu).

------------------------

As to "push failed with -11 error" so I found two threads about it (in Russian sorry):

----------------------

I can not help more sorry.

 
Shukurjon Beknazarov:
Does anyone know why this is?

This means that the local commit history and the history on the server have diverged. Most likely, someone pushed from another device, and you didn’t perform a pull before pushing your changes. By the way, a few weeks ago, running git pull was dangerous and could lead to loss of modified files (I’m not sure if this has been fixed since then).

Unfortunately, I can’t recommend anything other than using external Git tools, as I’m really disappointed with how MetaQuotes implemented the built-in Git support in MetaEditor.

 
Sergey Golubev #:

I use it by right mouse click on the indicator/EAs/any in MetaEditor for Git Commit (I am not using main menu).

------------------------

As to "push failed with -11 error" so I found two threads about it (in Russian sorry):

----------------------

I can not help more sorry.

Yes, if I first did "Git pull" and then "Git commit", it worked without errors.

Thank you Sergey.

 
Vladislav Boyko #:

This means that the local commit history and the history on the server have diverged. Most likely, someone pushed from another device, and you didn’t perform a pull before pushing your changes. By the way, a few weeks ago, running git pull was dangerous and could lead to loss of modified files (I’m not sure if this has been fixed since then).

Unfortunately, I can’t recommend anything other than using external Git tools, as I’m really disappointed with how MetaQuotes implemented the built-in Git support in MetaEditor.

Thank you.
 
Vladislav Boyko #:

This means that the local commit history and the history on the server have diverged. Most likely, someone pushed from another device, and you didn’t perform a pull before pushing your changes. By the way, a few weeks ago, running git pull was dangerous and could lead to loss of modified files (I’m not sure if this has been fixed since then).

Unfortunately, I can’t recommend anything other than using external Git tools, as I’m really disappointed with how MetaQuotes implemented the built-in Git support in MetaEditor.

Yes, and it is about external Git tool (from MQ): post  
(just for someone who is interested in it for example). 
What happened to Algo Forge MT5 Build 5200?
What happened to Algo Forge MT5 Build 5200?
  • 2025.08.04
  • www.mql5.com
Nothing changes but all files marked as modified? Is that a new feature...
 
Sergey Golubev #:
Yes, and it is about external Git tool (from MQ): post  
(just for someone who is interested in it for example). 


I have no experience with SVN (or TortoiseSVN), but here's a quote from the Git book:

https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F

As you learn Git, try to clear your mind of the things you may know about other VCSs, such as CVS, Subversion or Perforce — doing so will help you avoid subtle confusion when using the tool. Even though Git’s user interface is fairly similar to these other VCSs, Git stores and thinks about information in a very different way, and understanding these differences will help you avoid becoming confused while using it.
As someone who's new to Git, I’d be hesitant to use a Git tool that is based on an SVN tool. I might be wrong, but to me, "based on TortoiseSVN" sounds extremely odd, given how different the Git and SVN paradigms seem to be (SVN is Subversion).