Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does Magit handle complex merges? The website shows simple diffs. In my experience, merging is something where a great UI can vastly simplify the process. I personally use SmartGit which I find is fantastic for diffs and resolving conflicts.


> How does Magit handle complex merges

Like most of the things in Emacs - with variability that can suit [almost] every scenario - you can simply accept upstream or downstream changes with a keypress; use plain (line-by-line) diffing or 3way-merge diff UI; you can go through every hunk and precisely control things, while (if needed) rewriting the code; you can delegate the task to the external tooling;

What's great is that all that is happening in your editor - you can always bring another window next to your conflict resolution to compare with context in a different branch, revision or stash; you can jump from a diff pointing to a file to open it in Dired - directory browser and editor, where you can also get the log of changes pertaining that file only (or any marked files and dirs in the filetree). You can even ask LLM to help you at precise point, by just marking a hunk and sending a request - without context switching, without losing your focus.


It shows you conflicting files. I normally resolve each via ediff or my IDE and then go back to magit. It’s not a diff/merge tool.


Ediff and smerge are both fun to use in Emacs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: