How to deal with git conflict conflict under MacOS

Source: Internet
Author: User
Tags install homebrew git mergetool
Git often encounters conflicts when doing a merge, most of which are solved with the IDE's integrated conflict resolution tool, but sometimes you can't rely on the IDE to get back to figuring out some of the basics of git.

Mergetool.

In fact, without the command line of the comparison tool self-abuse, Linux generally recommended KDIFF3 and meld these two visual merging tools, I chose the meld, it is based on GTK, Kdiff is based on KDE, meld can be used under MacOS (need to install X11 first):

$ Brew Install Homebrew/x11/meld

After installation, set up the appropriate git module:

$ git config--global merge.tool meld

Merge

When you perform a merge operation such as:

git merge origin/feature/task-629

After the conflict is prompted, execute:

Git mergetool

A visual interface will pop up for you to manipulate the merge.

After you complete a file merge, save, close, and continue to pop up the next conflicting file's merge interface, until the end of the operation.

Then git commit-m ' can

The above describes how MacOS under git conflict conflict processing, including the conflict,macos aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.