Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading GIT Merge Markers

Tags:

git

merge

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?

like image 753
Dan Rosenstark Avatar asked Oct 19 '25 12:10

Dan Rosenstark


1 Answers

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.

like image 97
Tim Henigan Avatar answered Oct 22 '25 01:10

Tim Henigan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!