Search code examples
gitgithubgit-plumbing

Git id not showing any conflicts for binary files


We are checking in binary files into git. The problem is git does not shows conflicts/changes while merging. It just accepts the file and overwrites it even there are conflicts. I am not sure whether git understands binary files or not. Please help and provide suggestions.

Note: Binary files are generated from our own tool.


Solution

  • If the binary files are generated, they should not be put in the git repo in the first place.

    When merging, there will be a conflict only if the binary file has been update in both branches (the source and the destination branches of the merge). In that case, as shown in "Resolving a Git conflict with binary files", there will be a conflict.

    If the binary file has been updated only in the source branch, then it will overwrite the same file in the destination branch of the merge.