Is there a simple way to handle binary files in git operations? I think my ideal in this case - \'merging\' of .mo files (binary .po messages) - would be to give precedence
You could add a custom merge driver in a gitattributes file (see this SO question), only for the *.mo
files and only in the relevant directories.
echo *.mo merge=keepTheir > dirWithMoFiles\.gitattributes
git config merge.keepTheir.name "always keep theirduring merge"
git config merge.keepTheir.driver "keepTheir.sh %O %A %B"
With keepTheir.sh
as:
mv -f $3 $2
exit 0