Claude Code for Product Designers
Lesson 16 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

2.2 GitHub

Next lesson in 8 s

2.1 Git in one picture

Adam explains the difference between Git and GitHub, then walks through commits, pushes, branches and pull requests using Figma analogies like version history and duplicating a page.

What you'll learn

  1. Git tracks every change in a project folder, locally on your Mac.
  2. GitHub puts that folder online for others to download and contribute to; repos can be private or public.
  3. Git and GitHub help engineers resolve conflicts when they edit the same lines.
  4. A commit is a labelled snapshot of the entire folder (not one file or layer), like a manual version in Figma's version history.
  5. A commit stays on your computer until you push it to the origin repo.
  6. A branch lets you build on a fixed snapshot without chasing changes others make on main; new features and fixes almost always start with one.
  7. A pull request summarises the changes, invites review from people or AI agents, and once accepted merges the branch into main.

Chapters

  1. 00:00Git versus GitHub
  2. 02:15Commits and pushes
  3. 05:29Branches, like duplicating a page
  4. 08:02Pull requests and merging
  1. 00:01Welcome back to this new module.
  2. 00:03In this module, we're going to unpack what it means to work with Git, what is Git, what is GitHub, and how we can actually make use of it in
  3. 00:13our daily workflow. So this is going to be more of a theoretical lessons lesson, but like I really encourage you to stick around because even though you might have
  4. 00:21heard about like Git pulls, Git commits, Git pushes, I really hope this video is going to let the connects in your head sort of connect.
  5. 00:30And let's start by unpacking the difference between what is a Git and what is a GitHub because you might have heard both terms and they are not necessarily the
  6. 00:38exact same thing, although one sort of builds on top of another.
  7. 00:41Let's start with Git.
  8. 00:43So Git is that original versioning system.
  9. 00:47Basically, imagine you have a folder on your Mac and each file or each change that you make to any of the files in that folder can be now Git
  10. 00:56tracked. So we can like track of like keep track of all of the changes that are happening.
  11. 01:01Every time you delete a file, you change a line of text in one of the file or create a new file, you can like have these changes like version
  12. 01:09in a way that allows you to really quickly go back and like see exactly what's been happening.
  13. 01:14But this is only happening locally on your Mac on your folder.
  14. 01:19So what GitHub does is it allows you to have your Git repository, so that folder which is Git tracked, and have it pushed online for others to see and
  15. 01:29use as well to help you contribute to the exact same folder.
  16. 01:33And GitHub is amazing because like with big code repositories, it might be very easy for engineers to step on each other's toes and like keep editing the same files.
  17. 01:44And what Git and GitHub does, it like it does a really good job at helping engineers resolve conflicts if they appear.
  18. 01:52So engineers like editing the same line of code in the same file.
  19. 01:58And yeah, it like first foremost, what GitHub does, it takes that folder of yours and it like makes it available for others out there online to like download onto
  20. 02:08their computer. Only if you want to, of course.
  21. 02:10You can have private and and public GitHub repositories.
  22. 02:13We'll get into that in a second.
  23. 02:15Um now with the difference between Git and GitHub out of the way, let's talk about the basic key concepts in working with Git.
  24. 02:25So at the end of the previous module, we did our initial commit.
  25. 02:30So we did like we basically have taken all of our work, all of the changes we did, like the refinements or work on the mobile, and we have squashed
  26. 02:39them into one initial commit.
  27. 02:42But if we were to like do proper commit work from the very beginning, our Git history would probably look something like this.
  28. 02:51So I have at this timeline with the most recent thing being listed at the top.
  29. 02:54Now each dot here in this timeline is one commit.
  30. 02:58So a commit is basically that snapshot in a version history.
  31. 03:03It's not that like, you know, each commit can only have one file or one change.
  32. 03:07Quite the contrary actually.
  33. 03:09You can have multiple file edits and differences or deletions or like new files be stored under one single commit, which then you can like add a label to this
  34. 03:20commit, add a little bit of a description so that it's easier for you to later on track it down and undo if you want or take out or reorder
  35. 03:29if that is something you need for for some reason.
  36. 03:33So when you when when I'm describing this concept, it may actually sound familiar.
  37. 03:37So in Figma, there is also a versioning system.
  38. 03:41I'm not sure if that was ever like really used that often.
  39. 03:44I guess maybe for folks working on design systems or really large elaborate files, that was handy.
  40. 03:50But yeah, there is a versioning system and it works automatically.
  41. 03:53Figma is going to be like creating snapshots for you on like without you ever noticing.
  42. 04:00And it allows you to like preview the snapshot, duplicate it, or restore your file into that version.
  43. 04:07But then you can totally create your own snapshots, and this is exactly what commits are.
  44. 04:13Uh notice how I'm creating a snapshot on this entire like the entire version of this file, right?
  45. 04:19So it's not that I'm creating a snapshot on change that I made on one particular frame or one particular layer or component.
  46. 04:26A snapshot is something that is um that encompasses the entire file, and the same is true with commits in your git tracked folder.
  47. 04:35One commit is going to basically like take a look at what's what has changed in your entire folder, and it's going to save that as a snapshot.
  48. 04:42Um then we have a concept of doing git push.
  49. 04:47So a commit like the first time you make it, it's only local to your computer, meaning nobody else on GitHub is going to see it.
  50. 04:56Uh if you want to make that commit or a set of commits available to other people, you would have to do what's called git push.
  51. 05:03So basically taking your commits and then pushing them to the origin repo.
  52. 05:08So origin mean that you know original repository in the clouds so so to speak.
  53. 05:13Um so that's this is why we do git push, right?
  54. 05:16Git commit, git push they often times this is often time something we would do right like like in combination I guess.
  55. 05:25Um then we have the concept of branching, branches.
  56. 05:30So um it might be familiar or it might sound familiar.
  57. 05:34Let's say I'm working on this Figma file, and I have this wild exploration in mind that I want to just try it out.
  58. 05:41So rather than changing like this entire file um ooh look at that.
  59. 05:493D in Figma, that's so cool.
  60. 05:51About time. Okay, I don't want to get too distracted by that.
  61. 05:56So let's say I want to I want to do this like wild creative exploration.
  62. 06:00What I would do often times I would just duplicate this page, maybe call it uh temporary exploration.
  63. 06:06Maybe that's not a temporary exploration, maybe that's just an exploration.
  64. 06:10Um, I would do make some changes here, and only if I like them, I would come back here and probably like I don't know, either just copy and paste
  65. 06:18layers from like this page back to this page, or sometimes even recreate everything again from scratch, but this time on that live version of the design.
  66. 06:28Others would maybe duplicate a file here.
  67. 06:31That's totally also an option.
  68. 06:33So a branch in Git is sort of a similar concept.
  69. 06:38So you create basically you choose a snapshot in your timeline, and you decide, okay, I want to create a branch from here.
  70. 06:46So even though other people might be still making changes to that main branch of our Git repository, and they might be pushing these changes, uh having a local branch
  71. 06:56makes sure that your code or like your building on top of that like very specific snapshots, and it's not that like you need to be constantly chasing all of
  72. 07:05the changes that are happening alongside in real time on that main branch.
  73. 07:10Gives you that peace of mind.
  74. 07:11And so when you're on the branch, you can make like keep making comments on that specific branch separately.
  75. 07:18And branch is something you would often time do whenever you want to start working on a new fix or a new feature or really anything.
  76. 07:25It almost always starts with a branch.
  77. 07:28That is like a really good idea to do.
  78. 07:30And we are going to be working on adding that my bookings view in this module.
  79. 07:35And yes, we are going to start things off by creating a separate branch for this work to be tracked in.
  80. 07:41We're going to make a couple of comments.
  81. 07:43We're going to then test this implementation, and once it's looking good, we will want to merge this branch again back with the main branch so that it becomes part
  82. 07:53of the like the live breathing application.
  83. 07:56And the way for us to do so is by using GitHub's own concept, which is called a pull request.
  84. 08:04So a pull request like sure, we could have just merged one branch with another uh without like doing anything, but that is not really considered a good practice when
  85. 08:14you're working with other engineers on the same code repository.
  86. 08:19The reason pull requests are so great is because they create a summary of you know okay what is what are these changes about?
  87. 08:26Here are the files that have been affected or that are changed in this particular branch and it allows or creates opportunity for other engineers or AI agents these days
  88. 08:37to review this like work like by just looking on the things that have changed, provide you uh with the feedback or what's called a code review which you can
  89. 08:46then later address or ignore and then only once everyone in the team is happy about like this the shape of your branch that pull requests can be uh accepted
  90. 08:58which means merging your branch or commits in your branch with that main branch.
  91. 09:03Um and that is really the these are the most important like um fundamentals about uh working with Git.
  92. 09:13Over the course of the next couple of videos we are going to set up a GitHub account, we are going to push our local repository to GitHub and then
  93. 09:21we are going to start working on the My Bookings view while keeping track of uh what is happening with Git and we'll also get to uh see how it
  94. 09:32looks how it all looks like in practice.
  95. 09:35So thank you and I'll see you in the next video.

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…