tags:

views:

111

answers:

1

Sorry, this is a very simple question. What does this merge marker mean in GIT

>>>>>>> next-release:db/schema.rb

when it's got no accompanying?

=======

Also, is there some way to tell GIT to just choose one version over another?

+4  A: 

To tell Git to choose one version over another (of an unmerged path), you can use one of :

  • git checkout --ours -- path/to/file
  • git checkout --theirs -- path/to/file

See the git checkout man page for details.

Regarding the merge marker; I have never seen a ">>>>" added without a matching "====" and "<<<<". Are you sure this wasn't left over from an attempt to manually resolve the conflict?

The tag next-release:db/schema.rb simply indicates that the file "db/schema.rb" is on the "next-release" branch.

Tim Henigan
Cool, +1 and thanks for that, Tim. It could indeed be that it was left over from an earlier conflict, since I had this problem last time I merged, and I don't know how I resolved it :)
Yar
a bit of research reveals that you are correct, thanks!
Yar
The `--ours` and `--theirs` are excellent tips. I obsessively read man pages to find options and still forget about those sometimes.
Jefromi