-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge conflicts cause confusion and aren't handled well #5400
Comments
Via @niik in #2640 for solving the problem of differentiating between conflicted files and those without conflicts:
|
DesignsAfter some sketching, and a quick round of usability testing, we have a direction that we're going to move forward with building. Encountering merge conflictsThis experience would begin by clicking the If you run into conflicts, we will show you this modal, which lists the conflicted files, and sends you to your editor of choice. You can abort your merge at any time in the process. If you abort while you have some resolved changes, we’ll show you a confirmation modal. Resolving merge conflictsUsing Atom as an example, you would resolve conflicts in your editor or merge tool of choice: When you come back to Desktop, these changes are reflected: As you continue to resolve the conflicts, the modal continues to update. The number of merge conflicts per file will update as you resolve the conflicts in each file: Committing your mergeOnce all conflicts are resolved, you can commit the merge from the modal, and we’ll take you to the Changes view with your merge commit ready to be undone if needed. Some questions we're still looking to investigate:
|
I don't have a great deal of time to answer here but I definitely want to answer this question. |
Hi @hdsantos89, thanks for the feedback, that's great to hear. We're tracking side-by-side diffs here (#172), which I know is closed currently but is tracked as a We'll definitely keep an eye on whether the guided flow is universally valuable or whether folks want to just be able to see the conflicted diff in Desktop and resolve the conficts on their own. |
In my opinion users expect to see a simple side by side diff view. With some simple black arrows to merge the diff from ltr and rtl. |
I wanted to write that I don't like the changes, cause the default editor is Atom (...nasty tabs...) and I can't really change it... But then, I took a look at settings and found there Sublime 🙌 So, I'm ok with new feature. Can't say that wow it's a breakthrough, but it's good for sure I personally use GHD only for merge conflicts and to watch current (some commit) diff |
Thanks @Tsarfolk! There are a lot of editors available to work with Desktop (documentation here with available editors), and for the example you gave, XCode, we have an open issue if someone wants to configure it: #4825. You're also able to always update your preferred editor in preferences. Hope that's helpful! Our primary goal with the feature was to lower the level of intimidation of merge conflicts and make them more approachable for newer developers, while also not making them too burdensome for more experienced developers. We're discussing whether we can improve on the latter portion in #6213. |
When merging, I don't always only review conflicts: I sometimes want to review other changes as well. Until now, I was able to glance through them by going through each file in the "changed files" list in GH. Wit this modal, I can't do that anymore. If it's a long list of files, I can't even see in GH which files are changed, as I can't scroll with the modal in place. Therefore, I'd like to have a third button in the modal: "Resolve manually", where the modal closes and the changes are still in the staging area/ working directory. |
Thanks @everhardt! That's really helpful feedback. We're looking at this in #6213. Your problem statement is slightly different from the person's from that issue but I think @ampinsk's initial thinking on it would also solve your problem in a similar manner that you proposed. We're still discussing this internally and trying to gather more data about how it's working for folks and how it's falling down, so I really appreciate you weighing in. |
Seconding these things mentioned by @Tsarfolk and @everhardt as they line up with my experiences as well:
and
My workflow in GHD up until the new merge modal has been:
Now, I don’t have that option. And since Xcode is not yet recognized as one of the valid GHD editors, I actually can’t perform a conflicted merge in GHD now. Just wanted to give some +1s on this thread, thanks! |
Thanks @jbrennan, especially for explaining your workflow! I think you should be able to do something very similar to your previous workflow when we ship the next iteration (that we're tracking in #6213), and also have available which conflicted files have all the conflicts resolved and which are still conflicted. Sorry for the inconvenience in the mean time. We're hoping this new path will be more useful for both people who prefer a bit more of a guided editor-centric workflow and people like you and the others who have offered feedback. Quick question for you though, if XCode did show up as a supported editor in the guided flow, do you think you'd still prefer to resolve it in the old way, or would you like to use the guided flow? |
Excellent, looking forward to this!
Hard to say for sure since I currently haven’t been able to use the flow, but probably yes. What I care about most during merge conflicts are seeing which files are conflicted + opening them in my editor to resolve them. Seems like supporting Xcode as an editor should handle that OK in the current workflow :) |
This is good news.
For (1), right now, we drop to cli and do "git checkout --ours/theirs -- path/to/file; git add path/to/file" for each file we don't care to merge |
Hi @timor-raiman, thanks for the feedback! We're considering some possibilities for a very lightweight version of (1) just in the guided flow. But generally our hypothesis has been (based on interviews and our observations) that there are so many different ways of visualizing and resolving the conflicts themselves and we think generally editors do a pretty reasonable job of this. Therefore instead of building yet another slightly different implementation of the same thing, we thought we'd start out by guiding users through the process to give them confidence when everything's resolved, but not actually going through the resolution itself. But we agree that there may be a bit more we can do without a full on conflict resolution tool in Desktop. (2) is a good suggestion and is captured in #1765. Ignore that it's closed - we're working our way through the future proposal labeled issues and many of them will likely be reopened as we get our arms around all of them. Thanks again! |
hope this have a option for KDiff3 |
Please describe the problem you think should be solved
When people run into a merge conflict, it's often a confusing and overwhelming experience. GitHub Desktop provides a few ways to merge code from one branch into another (or when pulling from your upstream remote), but when a merge conflict occurs, there isn't a particularly elegant way of handling it, and the app just sort of leaves people on their own to resolve it, usually in the browser, with their editor, or on the command line + an in-terminal editor.
Example:
This recent issue clearly captures an example where this can fall down: #5264
Next steps
We'll be using this issue to update the progress on each of these and we'll likely update it with additional references of others who have run into problems in this realm.
The text was updated successfully, but these errors were encountered: