Conflict

WHAT IS CONFLICT?

Many developers do not know what a conflict is and how a conflict occurs, and this panics the developer, and may not even know how to resolve the conflict.

  • The conflict occurs when two developers, can occur alone too, make different changes on the same line. Making it impossible to resolve the conflict without human intervention. The second person, between the two or more developers, who submits your changes, will be informed of the conflict, and will choose whether to apply their change over that of the other, or review the line to keep both changes.

You can resolve the conflict:

  • Manual form ➡ Open the file and delete it;
  • Vim;
  • Opendiff;
  • and other ways;

To call the graphical interface tool

  • the command is used:
$ git mergetool

Note: This command will only work when git complains about conflict

depending on the type of git configuration, it will open the tool.

  • There are other tools for working with conflict:
$ git mergetool --tool-help
'git mergetool --tool = <tool>' may be set to one of the following:
opendiff
vimdiff
vimdiff2
vimdiff3
The following tools are valid, but not currently available:
araxis
bc
bc3
codecompare
deltawalker
diffmerge
diffuse
ecmerge
emerges
examdiff
guiffy
gvimdiff
gvimdiff2
gvimdiff3
kdiff3
meld
p4merge
smerge
tkdiff
tortoisemerge
winmerge
xxdiff

To configure your git, "which tool will open from the command, for example: < git mergetool > needs to be set as default:

$ git config - global merge.tool "tool name"

Note: I use "opendiff".

results matching ""

    No results matching ""