-
Notifications
You must be signed in to change notification settings - Fork 14
Dealing with Conflicts
It is possible when multiple people edit simultaneously that you might end up with some lines with conflicts. This may happen when you have made local changes and then sync your VS Code from GitHub. When this happens, don't be alarmed. It is straightforward to deal with.
Inside of VS Code, the areas of conflicting edits will be highlighted. The top section will be the local (Current Change) and the lower section underneath the bars of equal signs will be the GitHub version (Incoming Change.) Across the top of each section will be a list of links. If you want to fully accept either the current change or the incoming change, click the link for that choice. If you would like to leave both sets of edits for you to manually reconcile, click the "Accept Both Changes" link. That will remove the markers around the conflict but also leave the contents of both sections. Edit from there until the text matches your desired version.
After clearing all of the conflicts, you will need to indicate to VS Code that you have handled the conflicts and are ready to merge the reconciled file. Click the Source Control icon (Y shaped one third from the top). You will see a section labeled "Merge Changes", with the guidebook.md or other file with conflict. The "C" indicator to the right shows it as a file with conflicts. Click the "+" icon to add it to the set of Staged Changes, and from there do a commit and merge as usual. The file should then sync with GitHub from there.