Claude Code for Product Designers
Lesson 29 of 49, 0 of 49 lessons completed
Sign in
Watch on YouTubePlay

Plays from YouTube. Google's privacy policy (opens in a new tab) applies.

Up next

3.1 The same product, a year later

Next lesson in 8 s

2.14 Merging parallel work

Adam squash-merges the motion PR on GitHub, then finds the accessibility PR blocked by merge conflicts and has Claude resolve them and squash-merge it.

What you'll learn

  1. PRs that branch from the latest main merge cleanly; once one lands, a second PR touching the same files can conflict.
  2. Conflicts on a shared repo are normal in teams, unlike two agents clashing in one local folder.
  3. Small PRs with short lifespans keep conflicts rare.
  4. Ask Claude to resolve conflicts: the session that made the PR, or any new session with GitHub access, can read the PR and fix them.
  5. For harder conflicts, ask Claude to explain in plain terms what the problem is, the risks, and how to keep both your work and the conflicting work.
  6. Claude can squash-merge for you; say the merge type you want.
  7. After the merge, the new version of the app deploys from main.

Chapters

  1. 00:00Merging the first PR by hand
  2. 01:31When a PR has merge conflicts
  3. 04:07Asking Claude to fix conflicts
  4. 05:13How Claude resolves the conflicts
  5. 07:01Letting Claude squash and merge
  1. 00:00Okay. Well, in the previous video, we created two cloud sessions, one in the cloud to take on the accessibility pass and then another one here locally to refine our
  2. 00:12animations using motion of the camera.
  3. 00:14I have refined the work.
  4. 00:16I have gone through the simplification pass with the simplify command, which we learned about a couple of videos ago.
  5. 00:22We also did code review, and now I have two PRs which are ready to be merged.
  6. 00:28So I'm going to go back to GitHub here, and I'm going to get onto the pull requests tab of our repository.
  7. 00:37Now I could have of course merged both of these PRs using my Claude, but I'm going to merge them over here so that we can witness something that is
  8. 00:46going to be a part of our daily workflow.
  9. 00:49So first, let me start with the first PR, the PR number two.
  10. 00:54This is the motion pass.
  11. 00:56I'm going to scroll down here, and I'm going to do a squash and merge PR.
  12. 01:01I'm sorry, squash and merge PR, okay?
  13. 01:04Because that is the convention we want to keep using in this code.
  14. 01:07We've already gone through what these PRs are.
  15. 01:10I'm just going to accept the default comment message and the additional description, and I'm going to confirm and do the squash and merge.
  16. 01:20And that came through very cleanly because well, we have branched off of main, the most recent version.
  17. 01:27There was no like no code conflicts.
  18. 01:30And now I'm going to head over to the pull request tab again.
  19. 01:35I'm going to head over this tab.
  20. 01:37And then I'm going to scroll down, and I can see I cannot merge this PR quite yet.
  21. 01:43And now it seems like I cannot merge it at all because there are there are merge conflicts.
  22. 01:50So you might be wondering what just happened.
  23. 01:53Didn't the premise of the previous video and the whole work with you know sessions the cloud and sessions locally based on the fact that we don't want to have
  24. 02:04any conflicts. Yes, we were talking about your local conflicts on your local machine.
  25. 02:10But conflicts on the PR or on the remote repository is actually a very common thing and you will be running into those quite frequently when you are working with
  26. 02:20other engineers in large teams uh in which, you know, there are many people contributing to the codebase all at the same time.
  27. 02:28Of course, ideally you don't have them, you know, very often, but they do happen.
  28. 02:32And when they do happen, it's a perfectly normal thing.
  29. 02:35And thanks to Claude, resolving this conflicts is not a very difficult thing to do.
  30. 02:41Of course, depending on what kind of conflicts you you might be running into.
  31. 02:45The best way to avoid these conflicts and these conflicts coming from the fact that, you know, um the same files have been edited in the same or similar way,
  32. 02:56the best way to avoid this is to keep merging these small, very like quick PRs.
  33. 03:02So the smaller your PR is and, you know, the shorter its lifespan, the easier it's going to be for you and the rest of the team to carry on
  34. 03:10with your work without too many conflicts.
  35. 03:12But every now and then there might be a piece of work which simply takes a little bit more time or just happens to be naturally um touching, you know,
  36. 03:21similar areas to the ones uh one of the other engineers might have been also working on.
  37. 03:27So with this video we are going to look at how we can resolve these conflicts as it's really easy.
  38. 03:32Um I already have a cloud cloud sessions to help me with that.
  39. 03:36This happens to be PR number three uh with conflicts on the alert dialog, bottom sheet, and toast.
  40. 03:42And that makes sense.
  41. 03:44We have been working on these components uh and we've been adding a lot of like refined motion uh to them.
  42. 03:52And then at the same time this session I have been also working on accessibility improvements which also happen to be touch uh to to touch these the same components.
  43. 04:01So with that I'm going to head back to my Claude Code desktop.
  44. 04:06And simply because I still have access to this session with the the cloud the cloud Claude Code session.
  45. 04:14I'm just going to ask it to go back to the PR, see what the conflicts are and resolve them automatically for me.
  46. 04:23If I didn't have access to this session, that's not a problem.
  47. 04:27I can just open up a new one and assuming that Claude Code your Claude Code has access to GitHub, it can very much open any PR you want and it can
  48. 04:37like read the contents and and like read exactly what is wrong.
  49. 04:41I wanted to merge the PR, but seems like there are some merge conflicts.
  50. 04:50Sorry. I wanted to merge this PR, but it seems there are some merge conflicts.
  51. 05:04Can you help me resolve them?
  52. 05:11Now what Claude is going to do right now is it's going to pull up the details of the PR it has just created and it's also going to pull
  53. 05:20up the details of the previous PR I assume and it's going to read through the code and see what the changes are and it's going to suggest the best
  54. 05:29way to proceed automatically.
  55. 05:32And you know, sometimes depending on what kind of conflicts you might have, it might be a little bit more difficult for you to resolve these conflicts in which case
  56. 05:41just what I tend to do is I just ask Claude to walk me through in plain terms what exactly is the problem and you know, what are the risks
  57. 05:49and you know, as much as possible how can we retain my both my work and the work that is you know, conflicting with what I'm trying to bring to
  58. 06:00the table with this particular PR.
  59. 06:04Um, so, let's see.
  60. 06:07Um, the PR, uh, two conflicts came from the motion rebuild of these three components.
  61. 06:13So, I'll keep the main motions versions and reapply the accessibility and those changes on top.
  62. 06:19Um, okay. And it seems to be getting through these conflicts quite easily.
  63. 06:26No more conflict markers are left and type check and lint passed, which is great.
  64. 06:31Now checking the auto merge CLAUDE.md and then re-running the browser checks since the dialog now animate out before unmounting.
  65. 06:39Awesome. Uh, seems like most of it is already done.
  66. 06:42Claude is just making sure, you know, things are in order and the PR is, you know, uh, ready to be merged.
  67. 06:49So, let's just give it a second and hopefully, uh, in a second we should go back when we go back to, uh, this GitHub page, uh, we should be
  68. 06:57able to see that this PR is ready to be merged again.
  69. 07:01Okay, and it seems like it's done.
  70. 07:04Um, Claude claims all of the conflicts are now resolved and, you know, everything looks green.
  71. 07:10So, let me go back to the main, um, GitHub, uh, PR page and I can already see without even refreshing the page that there are no more conflicts with
  72. 07:19the base branch, meaning we are all looking good to go and we are good to, uh, we are good to actually, uh, merge it.
  73. 07:27So, with that, um, this time I think I'm just going to ask Claude to merge the PR and I'm going to because I'm doing this with Claude and I
  74. 07:35know that I have this convention of doing, um, of doing the squash and merge, I'm going to make sure, you know, it does exactly this kind of merge.
  75. 07:44Merge the PR, squash and squash and merge, please.
  76. 07:51Um, and with that we can see, uh, hopefully in a matter of few seconds our PR, uh, being merged.
  77. 07:59Um, okay, Claude confirms there are no conflicts.
  78. 08:03Um, squash merging now.
  79. 08:06Um, it's using the GitHub tools.
  80. 08:11And okay. And it seems like the PR is now merged.
  81. 08:17And uh we're looking good in general.
  82. 08:20Uh so going back to the code tab, everything looks good.
  83. 08:24Uh the new the new version of the application is currently being deployed, which means our work here is done.
  84. 08:32And just like that, with the help of two sessions running simultaneously, we were able to do both a basic accessibility audit as well as refine animations in our application
  85. 08:45all simultaneously. And with that, [snorts] I'm going to see you in the next module in which we are going to revisit this application in a year from now.
  86. 08:55And we are going to talk a little bit more about working within you know a real existing codebase and a team of engineers.
  87. 09:05So thank you so much and I'll see you there.

The cheat sheet is for signed-in viewers. Inside: the lesson's prompts ready to reuse, the commands and shortcuts, useful links and what to watch out for.

Sign in to get the cheat sheet

Loading the cheat sheet…