Muntram van Chen
Muntram van Chen

Reputation: 445

Binary conflict with git merge

After merging with the remote repository I have a conflict with a PDF file generated by my code.

The file Graphs.pdf can not longer be created in my local folder, it is always automatically renamed to Graphs_computer_name_...._Conflict.pdf.

Even if I create the file myself with touch it is automatically renamed.

Upvotes: 0

Views: 1110

Answers (2)

vijayinani
vijayinani

Reputation: 2634

Best way is to not put the binary/generated files in the repository. Make sure your maven/gradle plugins are capable enough to generate the same on anyone's machine who pull the same code. Now, when the maven build happens, the binary should be generated again.

Upvotes: 0

gzh
gzh

Reputation: 3596

git can not merge binary files automatically. You should merge use merge tools which can handle pdf to do merge manually. Or specify the merge strategy to tell git to use remote version or local version of your binary files.

By the way, it is not recommended to add generated files to repository.

Upvotes: 0

Related Questions