Skip to content
Snippets Groups Projects
Commit eda760c9 authored by Daniel Duarte's avatar Daniel Duarte
Browse files

edit text in conflictPRes

parent cdac731a
No related branches found
No related tags found
No related merge requests found
# 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
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment