Watch on YouTubePlayPlays from YouTube. Google's privacy policy (opens in a new tab) applies.
Adam explains fork vs clone, then forks the team's repository, clones it to his Mac, reads the README and installs the dependencies with npm install. Starting the database fails because Docker isn't installed yet.
What you'll learn
- Clone vs fork, and when each is used (in a company you usually get an organisation invite and just clone).
- How to fork on GitHub and clone the fork with the GitHub CLI command from the Code button.
- A tidy folder layout:
Documents/GitHub/<username>/<repo>. - Read the README first: it lists requirements (disk space, Node.js 26, Docker Desktop, git) and setup commands.
npm installdownloads the "ingredients" listed inpackage.json; run it inside the project folder.- Low and moderate vulnerability warnings are common; leave them to the team's engineers.
- In real life you could just ask Claude (or an engineer) to walk you through setup.
Chapters
- 00:00Fork vs clone
- 01:47Forking the team's repository
- 02:52Cloning your fork to your Mac
- 04:57Reading the README first
- 06:03Installing dependencies with npm
- 08:36When the database won't start
- 00:00Okay, say this is your first day and you have just been granted access to this new GitHub repository with the code base of the application that you are about
- 00:09to work on. In this video we are going to look into how you can clone this GitHub repository, how we can create a fork and what does it mean
- 00:18and then how we can start setting it up locally.
- 00:22So first let's demystify the difference between fork and a clone.
- 00:26So if this was like a commercial project, chances are what's going to happen is you're just going to receive an invitation to join a new GitHub organization and with
- 00:38that invitation and with that access to this GitHub organization, you're essentially going to be able to just clone this GitHub repository.
- 00:45Clone as in, you know, take all of these files that are here right in front of me and just replicate them on your own computer so that you can
- 00:54set it up and start working on this so that you can start contributing to this code base, you can start raising PRs and whatnot.
- 01:00So this is what cloning is and this is one like it's a very common common example of working on, you know, GitHub repositories.
- 01:08But there is another way and this is what we are going to do here.
- 01:12We are going before we can clone the repository, we are going to make a fork of it or like a copy of it.
- 01:19So essentially what fork is is like taking an asset from a Figma community like a file and creating a new copy of this in your own drafts.
- 01:29Why are we forking this repository?
- 01:31Because we are starting don't really want anyone else watching this course to be raising any PRs to this particular repo.
- 01:39We just want to make it clean and so that everyone gets to just copy a very just clean version of this, okay?
- 01:47So first I'm going to create a fork.
- 01:50So I'm going to make a new copy of this repo under my own GitHub account.
- 01:55And so what I'm going to do is I 'm going to hit fork button over here and then um I can give a different name if I want.
- 02:02And I can set it like under whose owner this is going to appear.
- 02:05It's going to be under my own toilet granny GitHub account.
- 02:09I'm going to leave everything as is and I'm just going to hit the create fork button.
- 02:16Uh it's going to it's going to take a second.
- 02:18Basically, it's just replicating and creating a totally new independent copy of this repository under your own GitHub account.
- 02:27And with this kind of a copy, this is what I want to clone on my computer.
- 02:32Now, what I could do here is I could basically just take the URL of this um the URL of this GitHub repository and I can just take it straight
- 02:42to Claude Code. I can set up a new session locally on my Mac and I can ask it to walk me through.
- 02:48But since this is a video course, let's try to do it manually.
- 02:52Uh so the easiest way is to just hit that code button over here.
- 02:57And what I'm going to do is I'm going to use that GitHub CLI since we have already installed GitHub um through CLI or in CLI in one of the
- 03:07previous modules. So I'm just going to copy this command over here.
- 03:11And I'm going to um I'm going to open up a terminal.
- 03:16Um I'm then going to uh find a right folder in my on my finder.
- 03:24So over here in documents, I tend to create this GitHub folder and then name of the username of the organization and only then this is where I keep all
- 03:34of my like repositories each in its own different folder.
- 03:38So what I'm going to do is I'm just going to select this this folder and I'm going to hit option command C just to copy the path.
- 03:46And then within terminal, I'm going to type in CD as in current directory and I'm just going to command paste so that the terminal is now operating within this
- 03:55particular folder, the toilet granny folder.
- 03:58And then I 'm going to go back to my browser and I 'm going to copy this command again to my clipboard.
- 04:04And I'm just going to paste it in here, and hopefully my internet is not going to be playing any tricks on me.
- 04:11Uh, okay. And uh what this is going to do is basically it's going to download all of the files and it's going to create a new folder right in
- 04:20here with everything from this repo.
- 04:23Um so again depending on just how large this uh repository that you're trying to clone is, this process might take a couple of minutes uh even especially if your
- 04:34internet connection is like mine when it's constantly timing out.
- 04:39I'm just going to make another attempt uh in terminal rather than repasting that or retyping the same command.
- 04:45I'm just going to hit command up.
- 04:46I'm sorry, I'm just going to hit arrow up on my keyboard and hit enter.
- 04:50And then I'm going to wait patiently and this time it has worked wonderful.
- 04:56And this is uh this is my brand new folder.
- 04:59By the way, this is a folder from our own version of this application from the previous module, right?
- 05:05So um with that I'm going to head back to this GitHub um repo page.
- 05:14I'm going to scroll down until I reach a README file.
- 05:17And well depending on how comfortable you are reading technical stuff, sometimes it is uh a good thing to do is just to give this a very quick quick read
- 05:27or just a skim through um so that you can learn that um you know what what you're going to be needing is for example about 6 GB of a
- 05:35free disk space. I don't really think we are going to need this much for this, but you know uh we're going to need Node.js version 26 um and we're
- 05:44also going to need Docker Desktop and this is something we're going to dive deeper into in the next video.
- 05:50Uh of course you're going to need Git.
- 05:52We already have Git installed and then you have all of these commands uh for how to um for how to install and like set up this project.
- 06:01And we can actually try running some of that ourselves.
- 06:04Like for example, this first command, the npm install, is fairly straightforward.
- 06:09And since I already have that terminal open, I'm actually going to run it myself.
- 06:14What this command is is is well, the npm, which is something we've already discussed, a Figma community of sorts.
- 06:22This is going to basically go through this package lock JSON and package JSON file as this is where all of the information about the required dependencies for this application
- 06:36to be run and built.
- 06:38This is like where all of this information is listed.
- 06:41It's sort of like a cooking recipe.
- 06:44Like, you're going to need all of these ingredients.
- 06:47And what the what this command npm install does is it's going to look for these ingredients and it's going to basically download and install them on our machine in
- 06:57this folder specifically. Before I run this command, I will need to make sure that I am in the right folder.
- 07:03Right now, I'm still in this toilet granny folder, so I'm going to go back.
- 07:07I'm going to just basically again copy the path to this folder, option command C on my Mac, command and ooh, let's see.
- 07:19Seems like I'm still in this again, CD current directory.
- 07:25Okay, I think I just forgot about the current directory.
- 07:28So now I know I'm working on like within this folder.
- 07:32And then I'm going to do npm install.
- 07:36So I'm going to install all of the dependencies myself.
- 07:38Again, this might take a while, especially if this is especially if this is a bit more mature codebase.
- 07:45Might, you know, take also a little bit of your disk space.
- 07:49So just keep that in mind.
- 07:51In my case, it had it was went through it has gone through really quickly.
- 07:56Now it is very common typical that you're going to see vulnerabilities listed over here with different levels of severity, low, moderate, sometimes high and critical.
- 08:07Um, I would encourage you to like leave that to uh more experienced engineers to keep an eye.
- 08:14Um, hopefully there is a lead engineer on the team you're working with and that would be the person who's taking care of these uh packages.
- 08:23But like to have like low and moderate uh vulnerabilities, that is a very common thing for most of the repos.
- 08:31Um, okay. So I'm going to clear.
- 08:34Uh, basically everything has gone through uh quite okay.
- 08:38And then there's that second command, right?
- 08:41Um, a reminder, the end goal, what we want to do here is we want to run this application locally.
- 08:48I want to be able to uh open up a new browser tab, type in localhost 300 and I want to see not this.
- 08:56This is the previous version of the application.
- 08:58I want to see that mature version of the application in here, right?
- 09:02Uh, and I can see this command is listed over here, but before I can run it, there is that second command, the npm run database start.
- 09:10Now this is a new thing to us.
- 09:13So if I paste it, it's not really going to do anything.
- 09:17It's going to throw an error because we don't have Docker installed.
- 09:22And um what this is and what else we are missing in order to run this application locally is something we are going to dive into in the next video.
- 09:31We could have, of course, if this wasn't a course, if I wasn't recording this and if you were all by yourself, apart from asking a fellow uh engineer on
- 09:41the same team, you could have just asked Claude to walk you through it and chances are it's going to do a very good job and if there is anything
- 09:49you're going to like need from engineers, it's going to list it out.
- 09:53Uh, but again, because this is a video course, we're going to uh try to witness or at least capture on camera some of that ourselves.
- 10:01So in the next video, we're going to talk about working with local databases.
- 10:05I'll see you in there.