Claude Code for Product Designers
Lesson 17 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.3 Going live with Vercel

Next lesson in 8 s

2.2 GitHub

Adam installs the GitHub CLI with Homebrew and logs in, then asks Claude, in manual mode, to create a private GitHub repo and push the project to it, explaining why the repo should be private and where to check when GitHub or Claude is down.

What you'll learn

  1. The GitHub CLI (gh) lets Claude work with GitHub from the terminal; install it with brew install gh (Homebrew is "that App Store for engineers").
  2. Check the install with gh help; log in once with gh auth login (GitHub.com, browser, HTTPS, one-time code).
  3. If setup goes wrong, ask Claude Code to troubleshoot: old installs on your Mac can get in the way.
  4. Restart Claude Code after installing new tools and start the session in the project folder.
  5. Ask for a private repo; secrets should never end up on GitHub, even in a private one. You can switch a repo's visibility later.
  6. Manual mode shows each command (for example gh repo create <name> --private) before it runs.
  7. If GitHub or Claude behaves oddly, check GitHub's status page and status.claude.com.
  8. A repo's address is github.com/username/repo-name.

Chapters

  1. 00:00Installing the GitHub CLI
  2. 02:46Logging in to GitHub with gh
  3. 04:08Asking Claude for a new repo
  4. 05:39Why your repo should be private
  5. 06:48Claude checks and creates the repo
  6. 09:08Checking the status pages
  7. 11:06Your project on GitHub
  1. 00:00Okay, so with the Git and GitHub basics covered, let's try to push our local repository to GitHub.
  2. 00:08So first, I'm going to go into GitHub and I'm going to make sure I'm signed in or sign up if I don't have an account.
  3. 00:16So allow me to sign in first.
  4. 00:21Okay, I am signed in.
  5. 00:23And then with that, I want to go back to my desktop and I'm going to open up a terminal.
  6. 00:29And this is because once we have a GitHub account, we also need to install GitHub specific tools.
  7. 00:36So we've already installed like Git tools at the very beginning of the course that came together with our Homebrew installation.
  8. 00:47And by the way, Homebrew is also something that we've installed that we are going to be using right now.
  9. 00:51Remember, it's that App Store for engineers.
  10. 00:54We're going to go into that App Store and we are going to download a GitHub CLI, so terminal tools.
  11. 01:03This is so that our cloud agents can use these tools in their terminals on our machine.
  12. 01:09So with that, I have my terminal open up.
  13. 01:12Let me just remind myself of the command.
  14. 01:14Okay, and it's brew install gh.
  15. 01:18Okay, I'm going to make a little bit of an just so that we can see it clearly.
  16. 01:22Brew install gh. Again, these commands are going to be available wherever you're watching this video.
  17. 01:29Okay. It's going to auto update Homebrew apparently.
  18. 01:34Right, and it's going to download things and we are done.
  19. 01:40We have GitHub tools installed on our computer.
  20. 01:45So with GitHub tools, I'm going to type in clear.
  21. 01:48With GitHub tools installed, we also need to guess what?
  22. 01:51Authenticate, right? As with everything else.
  23. 01:53So with that, I am going to maybe first of all do gh help uh just to double and make sure that um the GitHub tools are really installed here
  24. 02:04uh and because I can see this response it is you know sort of a confirmation that uh we have these gh tools installed.
  25. 02:12Um if you run into any issues at any point don't hesitate to reach out to your Claude Code desktop and let it walk you through and troubleshoot whatever you
  26. 02:21see on your uh on your screen right now.
  27. 02:24This is important because um if you had any uh attempts at you know working with with the code before on your machine you might not even remember chances are
  28. 02:34there are already some you know setups or installations on your computers that might be now uh be causing some troubles.
  29. 02:42So just a tip like if you run into any troubles don't worry just let Claude Code walk you through it okay?
  30. 02:48Uh and with that I'm going to do um gh auth uh login and um it's going to ask me how I want to authenticate.
  31. 02:56I want to authenticate with github.com uh I'm going to log in with a browser and I'm going to use the https as the method of authentication.
  32. 03:05I'm going to confirm by just uh pressing Y on my keyboard uh and then pressing enter.
  33. 03:12I'm going to copy this one time code here uh command C and I'm going to hit enter to let terminal open up this page for me.
  34. 03:21I'm going to hit continue.
  35. 03:23I'm going now paste this code and I'm going to hit continue again.
  36. 03:28Uh I'm going to confirm that I do authorize uh this CLI tool to have access to my GitHub account.
  37. 03:34Uh this is ultimately how we are going to be creating repositories, pushing code and all that stuff.
  38. 03:40So I'm going to hit authorize and I'm all set.
  39. 03:44I'm going to go back to the terminal.
  40. 03:46It's going to take uh sometimes a couple of seconds but after a while you should see your username and a confirmation that we have logged in as uh well
  41. 03:55Toilet Runner in my case again um I don't think I want to go into uh uh of like where what is the origin of that nickname.
  42. 04:04Um okay. So with the uh GitHub tools installed, just as a good measure, what I'm going to do is I'm going to close my uh Claude Code uh desktop
  43. 04:13application. I'm also going to close the terminal.
  44. 04:16I'm going to relaunch Claude Code.
  45. 04:19Um and I'm going to uh open up a new conversation.
  46. 04:23Again, make sure you are in the Tonik parking course or whatever is the name of your project folder.
  47. 04:28It is important that we like start a new session with Claude Code in that particular folder.
  48. 04:34I don't really need Opus 5.5 for this.
  49. 04:36I'm going to select Sonnet 5.5 and um I'm going to uh you know what?
  50. 04:43Actually, I'm going to stick with the manual mode um just so that we can see everything that's happening because what we are about to do right now is we
  51. 04:49are going to ask Claude to help us push our folder to a remote repository on GitHub.
  52. 04:56And because we don't have any remote repository on GitHub yet, we are also asking uh we're also going to ask it to create one for us, okay?
  53. 05:03So uh really simple.
  54. 05:05Um Claude um I would like you to help me push this local uh repository or local folder or local repository uh oh sorry uh to GitHub and set up
  55. 05:21a new uh remote repo for this which I haven't created yet.
  56. 05:29I want to make sure my GitHub repository or repo for short um is going to be private.
  57. 05:39That is pretty important.
  58. 05:40There are two ways uh well like basically you can either make your GitHub repo public or private.
  59. 05:47Um some beginners uh make this mistake of uh like creating public repositories and um pushing files with their you know secrets uh or like environmental keys uh and things
  60. 06:02that could be uh like used to like create some or generate some really nasty charges.
  61. 06:11So make sure to mention that we are interested in creating or setting up a private GitHub repository.
  62. 06:18You can always switch it back by the way.
  63. 06:20It's not that it's set in stone, okay?
  64. 06:22So I'm going to hit send.
  65. 06:24Again, keep in mind I'm using Sonnet model because it's a pretty straightforward thing to do.
  66. 06:29We're just going to let Claude do it for us.
  67. 06:32Okay, so Claude wants to obviously check whether we have the GitHub command line tools installed and whether we are signed in, which is exactly what we did.
  68. 06:41Let's see if it's going to if it's going to like confirm it.
  69. 06:47[sighs] Oh, this is nice.
  70. 06:50So it's also going to check if we already have any secret files in our repo.
  71. 06:55Now I know we don't have any secret files.
  72. 06:59We are going to talk about these a little bit later in the course.
  73. 07:01So these environmental keys that I mentioned, like typically even though you have a private GitHub repo, you really don't want these secrets to ever ever like end up on
  74. 07:12GitHub. You want to keep them in different places, okay?
  75. 07:16But yeah, sometimes people like get forgetful and they would like push a file with a secret key.
  76. 07:23It's better to have, you know, a private repo.
  77. 07:26At least that's what you can do.
  78. 07:30Okay, the repo is clean.
  79. 07:31It has no remote yet, which is confirmed.
  80. 07:34The remote meaning that repository on GitHub.
  81. 07:37It has no secret files tracked.
  82. 07:38Yes. The GitHub check timed out.
  83. 07:41Okay, I do have some network issues here.
  84. 07:44So let's try that again.
  85. 07:48And Claude has confirmed that I have signed in as Toilet Granny and that I can create repos.
  86. 07:55It's going to create a private repository named after my folder and it's going to push the code to it.
  87. 08:01Perfect, which is exactly what we want.
  88. 08:03And by the way, again, this is how like it's a nice thing about this manual mode every now and then because like if you want to get a bit
  89. 08:10more comfortable working with a terminal or code yourself manually you can always have look at like what are the commands that you could have like totally be pasting or
  90. 08:23writing yourself in the terminal.
  91. 08:24So it's it would be gh repo create the name and then the private flag and you know let's clot let clot do it for us this time okay?
  92. 08:34So I'm going to allow once.
  93. 08:38Now it's verifying whether the repository is private and whether it's synced.
  94. 08:41Now if this is the first time you're doing this and you have plenty of files in your folder this might take a while because literally what is happening is
  95. 08:52you know we are uploading these files right now onto GitHub.
  96. 08:55So depending on your internet connection you might want to give it a second.
  97. 09:00But this this is a very simple lightweight folder.
  98. 09:04Okay let's verify again.
  99. 09:11So this is taking a little bit longer than usual and I suspect it might be because of our internet connection issues today in the office so bear with me.
  100. 09:21Luckily I can just you know cut this part out so hopefully you'll whenever get to hear these words.
  101. 09:28Okay it's going to check whether the network works.
  102. 09:31[laughter] Okay so yeah yeah I do have these network issues here so let's let's try it again.
  103. 09:41Hopefully it works this time around.
  104. 09:46And it has failed again.
  105. 09:50Okay. So right as I am recording this I'm not sure when you are watching this but at the day of recording this there is this Microsoft outage global.
  106. 10:05I'm wondering if it affects GitHub.
  107. 10:06I don't think it it should but let let us like let's, let's have Claude do that proper diagnosis.
  108. 10:16And, um, let's see.
  109. 10:19Uh, what I'm going to do in the meantime, I'm going to do a GitHub status, simple online search just to make sure everything works.
  110. 10:28Uh, it's a like thing you can do as well.
  111. 10:30Uh, if GitHub works or behaves, uh, in a weird way, you can always visit this page.
  112. 10:36If Claude ever uh, behaves in an unpredictable way, another cool URL to remember is status.cloud.
  113. 10:45I typed in AI, but it reroutes to com.
  114. 10:48And as we can see, there are, uh, [laughter] there are some elevator errors on with Claude.
  115. 10:54And yeah, there are these problems with Microsoft 365.
  116. 10:58Um, okay. So let's see.
  117. 11:03It's going to make another attempt, it seems.
  118. 11:05This is taking a little bit longer than it should really.
  119. 11:10Okay, the repository has been created because of my internet connection issues.
  120. 11:15Um, you know, it was a bit more convoluted than it should be.
  121. 11:19Um, but uh, Claude has confirmed um, that the the repo has been created.
  122. 11:23It's private and it seems it has just pushed um, it has pushed everything to GitHub.
  123. 11:32So let's go ahead and see.
  124. 11:33I 'm going to open up this URL.
  125. 11:35I'm going to open it up in Google Chrome.
  126. 11:37Um, and like generally, um, like to find any repository on GitHub, you will probably very quickly discover this pattern.
  127. 11:46It's slash your username slash your repository name.
  128. 11:50And we can confirm everything here is exactly as I had this on my computer, which is great, which means now we are um, basically protected.
  129. 11:58If anything happens to my computer, I have this uh, online backup on GitHub and I can keep now not only committing my work, but also committing and pushing it
  130. 12:09out there. So with that, we are ready to move on to the next video.
  131. 12:13Thank you. I'll see you in the next one.

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…