avatarFilip Jerga, June 19, 2020

Setup a project from Github Repo

Short guide how to setup a starting project in order to work on my tutorials.

TODO: provide alt

Following explanation you can find in my youtube video as well: https://youtu.be/VgUng7isvlY

First way to get a code from my(any) github repository is to download a project as a zip file.

Visit my starting project on which I will be later explaning programming concepts. You can find the project here: https://github.com/Jerga99/next-youtube-course/tree/master

On right hand side of the screen click on download button.

Click on download

After the file is downloaded, unzip it. Go into project folder in your terminal and run command npm install

To run the application run npm run dev and in other terminal window run npm run server to run api server.

To test Next.js application visit localhost:3000, to test api server visit localhost:3001/api/test

In some of my videos I will be asking students to checkout to specific version of the project. Project contains multiple "tags" (versions) of the code. To get speicific version of the project click on "Branch" on the left side and select tags.

Select specfic tag, click download and reapeat all the steps above. Npm install, npm run dev, npm run server... and you are good to go.

Other, better way to setup github repository is to clone it. To clone github repository you need to install Git CLI so you can use git commands in your terminal.

Download Git from here: https://git-scm.com/downloads and install it.

Go to your terminal copy clone "link" from repository

In your terminal navigate to a folder where you want to initialize a project.

Run command:

git clone <source clone link> <name of the project>

git clone https://github.com/Jerga99/next-youtube-course.git new-project

Once again npm install, npm run dev ....

To checkout to specific version you need to following:

  1. run git tag, this will list all of the available tag
  2. checkout to specif version, let's say v1.2. Run git checkout -b new-branch v1.2
  3. Now you are ready to go.

That should be it guys. I hope you didn't have any problems to setup the project. You can also watch my youtube video explaining this topic here: https://youtu.be/VgUng7isvlY

Check my courses on eincode.com