Reset to the commit before the wrong one
git reset YYY --hard
git push origin master --force
Update to the current 'blessed repos'
git pull molgenis master
Get any commits we did AFTER the wrong one
git cherry-pick XXX
Solve conflict
git rm
git add
Commit the cherry picked
git commit -m "Merged the cherry-pick 'XXX'"
Update your own remote
git push origin master