Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

version control - Right way of tracking a sqlite3 binary file in git?

I maintain a fork of a repo.

That repo which has been tracking a binary file (which is a sqlite3 file).

Every time I pull from that repo, I experience merge conflict due to that binary file.
What is the right way to solve this kind of merge conflict?

What is the right way to manage binary files (like this sqlite3 *.db file) in git?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You could define a custom merge driver specifying to always "keep theirs" (copy the version you are pulling) on top of your current version.

.gitattributes

mysqlite3.db merge=keepTheir

(That being said, remember binaries aren't always best managed with Git, especially if they are modified often)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...