Whichever framework I use (Catalyst, Django, etc.) for personal projects, I always develop with a local SQLite database. From time to time they can get out of sync between branches. While working on a project recently, I ran into a Git conflict between a SQLite database on
master and an older copy on a development branch.
After checking out the development branch, I ran the merge:
$ git checkout dev_branch $ git merge master
I posed the question on the Git irc channel and was told (thanks doener) to use the
--theirs flag for
$ git checkout --theirs filename(s)
This says that the file(s) being merged in take precedence over the file(s) in place in the branch, thus running this will overwrite the file(s) on the branch.
--ours is the opposite in that the file(s) on the branch take precedence in this merge. More information can be found in the git-checkout docs.
I was then able to complete the merge:
$ git add umerged_file(s) $ git commit
In the old version I was running (126.96.36.199)
"git reset -- file; git checkout MERGE_HEAD -- file" would have done the same.