The Atom text editor has a built in merge conflict tool that enables you to simply choose which branch you would like to keep. Instead of removing the content you don’t want and those pesky merge conflict markers, you simply choose theirs or yours.
To see the Atom merge conflict tool in action, perform the following:
If you already completed all of the exercises in this course, you can re-import the course repository and give it a different name.
- Clone the repository locally.
- Checkout to the
In the terminal, open Atom using the
Depending on your operating system, you may need to configure this behavior.
- Edit the
_config.ymlfile, making changes to lines 12-19 and save the file.
- Create a commit based on those changes.
- Checkout the
git merge username-configwhile on the
masterbranch. You will encounter a merge conflict.
If there are multiple files within the merge, you can type
git statusto see which file (or files!) is causing the conflict.
- Open the
_config.ymlfile with Atom.
- Select the Use me option for your changes.
git add _config.ymlfollowed by
git commit -m "Add my config changes"and enter enter.
- Congratulations, you resolved a merge conflict locally with the Atom editor!