Reading GIT Merge Markers

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

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

when did he not accompany?

=======

Also, is there a way to tell GIT to simply select one version over another?

+3
source share
2 answers

To tell you Gitto select one version over another (from an unrelated path), you can use one of:

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

See the git checkoutman page for more details .

Regarding the merge marker; I have never seen the added "→ →" without matching "====" and "<<<<". Are you sure this was not done after trying to manually resolve the conflict?

next-release:db/schema.rb , "db/schema.rb" " ".

+5

, , rebase.

.
:

git checkout --theirs -- <filename>

, :

git checkout --ours -- <filename>

.

" "" "" ?", , .

" "" ?", '-' .

, , Git , , , , , .

0

Source: https://habr.com/ru/post/1719305/


All Articles