Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT Meld how to keep both changes during merge?

Tags:

git

meld

I am using Meld in Sourcetree to resolve conflicts. The issue that is faced is that i must select local or remote changes and i can't keep both changes. Any idea if this is possible in Meld?

like image 729
Momen Avatar asked Jun 12 '18 08:06

Momen


People also ask

How do you resolve a merge conflict in meld?

In case of a merge conflict, you need to manually edit the conflicting files, comparing the changes you and your colleague made and deciding on the final version of the files, and then run git commit to finalize the merge commit.

How do you trigger a merge conflict?

Often, merge conflicts happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file. You must resolve all merge conflicts before you can merge a pull request on GitHub.


1 Answers

You can choose one side and then add the other by pressing CTRL on your keyboard. It'll prompt you if you want to add above or below your previous added change.

In addition to directly editing text files, Meld gives you tools to move, copy or delete individual differences between files. The bar between two files not only shows you what parts of the two files correspond, but also lets you selectively merge or delete differing changes by clicking the arrow or cross icons next to the start of each change.

The default action is replace. This action replaces the contents of the corresponding change with the current change.

Hold down the Shift key to change the current action to delete. This action deletes the current change.

Hold down the Ctrl key to change the current action to insert. This action inserts the current change above or below (as selected) the corresponding change.

For more infos: http://meldmerge.org/help/file-changes.html

like image 178
Maxime Tessier Avatar answered Sep 20 '22 10:09

Maxime Tessier