diff --git a/Jenkinsfile b/Jenkinsfile
index 3cbbd6e776f632c4d0c7295e6825fd08951c49f0..888bb7a9e1fc5bc73a321a5f8999c2c7d3575ccf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -136,7 +136,8 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration_client
 
             steps {
                 sh """git checkout ${params.CHANNEL}
-                      git merge --no-commit FETCH_HEAD
+                      # Submodules are generally not managed by merging
+                      git merge -X theirs --no-commit FETCH_HEAD || git add `git diff --name-status --diff-filter=U | awk '{print \$2}'`
                    """
             }
         }