From eda760c920858947c6908dfdd644cc3c1dc4a704 Mon Sep 17 00:00:00 2001 From: Daniel Duarte Tojal <daniel.duarte.001@student.uni.lu> Date: Wed, 11 Sep 2019 10:28:28 +0200 Subject: [PATCH] edit text in conflictPRes --- .../slides/conflictPresentation1.md | 27 +++++++++++++++---- .../slides/conflictPresentation2.md | 15 ++++++++--- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/2019/2019-09-09_testCourseAdv/slides/conflictPresentation1.md b/2019/2019-09-09_testCourseAdv/slides/conflictPresentation1.md index de838c80..ec8b72da 100644 --- a/2019/2019-09-09_testCourseAdv/slides/conflictPresentation1.md +++ b/2019/2019-09-09_testCourseAdv/slides/conflictPresentation1.md @@ -1,10 +1,27 @@ # Practical: Conflict resolution using kdiff3 -* Go to the previously made Micheal.md file and add a last name to Micheal in your editor +* create a branch named changeMicheal and in the editor you change +the content of `Michael.md`: +```bash +$ git checkout develop +$ git checkout -b changeMichael +``` -* Meanwhile a coworker changed that Micheal file in the develop branch +Change Michael file... -* If you try to push your changes to that file into develop, you'll encounter a merge conflict, -the system cannot know which change is now the one to keep. +```bash +$ git fetch upstream +$ git checkout develop +$ git merge upstream/develop +``` -* Usually done using `git diff` in bigger project this method quickly loses oversight \ No newline at end of file +summary: +michael.md on develop: +``` +# Michael +``` + +michael.md on changeMichael (example) +``` +## Michael Evans +``` \ No newline at end of file diff --git a/2019/2019-09-09_testCourseAdv/slides/conflictPresentation2.md b/2019/2019-09-09_testCourseAdv/slides/conflictPresentation2.md index 39e19635..63bff91d 100644 --- a/2019/2019-09-09_testCourseAdv/slides/conflictPresentation2.md +++ b/2019/2019-09-09_testCourseAdv/slides/conflictPresentation2.md @@ -1,7 +1,16 @@ # Practical: Conflict resolution using kdiff3 -* When prompted with the merge conflict, open kdiff3 to check the affected files +If then there is a rebase done on develop: +```bash +$ git rebase develop +``` +A conflict should emerge -* Selecting A will keep the changes of the target branch, while B will keep your changes. Selecting A and B will combine both changes to the merged file. +* When facing the merge conflict message, use the command +```bash +$ git mergetool +``` + +* This opens kdiff3 if it was properly set up. Selecting A will keep the changes of the target branch, +while B will keep your changes. Selecting A and B will combine both changes to the merged file. -* We are only interested in your changes, so select B and save \ No newline at end of file -- GitLab