FAQ: Deploy Your Website to GitHub Pages - Initialize Your Repo

This community-built FAQ covers the “Initialize Your Repo” exercise from the lesson “Deploy Your Website to GitHub Pages”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Deploy a Website

FAQs on the exercise Initialize Your Repo

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

1 Like

where do you find a websites directory on github pages

2 Likes

Hello,

I don’t understand how to use the “cd” command to navigate to my site’s directory. :pensive:

2 Likes

For example you have a directory:

Desktop:
     Images:
          Cloudes.png
          Shadows.jpg
     Videos:
          Funny:
              Skatboarding-fail
          Sad:
              Cat's funeral
     Programmes:
          HTML.html
          JS.js
          CSS.css

Okay so you are in images folder,
You can go back using cd ..
Then you want to go to funny folder inside videos so you can do this in one command: cd Videos/Funny
Or you can do it in two commands: cd Videos (On a new line)
cd Funny

You could do it in one command cd ../Videos/Funny
And if like you are in Sad folder inside videos and you want to get to the Desktop: cd ../.. firstly it backs to videos folder then to the desktop folder
Hope this helps to understand the cd command :grinning:

2 Likes

Thank you very much for your help ! Now I can peacefully continue my exercise :sob:

2 Likes

Hi, I want to create my website from scratch instead of using Jekyll. How do I use GitHub in this scenario?

I already have all my codes?

3 Likes

Step 2 is really simple, but not working. I type “git init” and hit enter and the terminal initializes, but the little box next to step 2 doesn’t turn into a green checkmark or a red X. It just turns to a grey X that I can’t do anything with.

3 Likes

Add ‘personal-website/’ after ‘git init’. It took me awhile to figure that out but it worked and I would guess is correct since I got a green checkmark box. I had a similar problem in another exercise where the only instruction was to type ‘cd’ but the terminal needed additional information.

2 Likes

Its doesnt work! So I write
-git init
-mkdir personal-website
-cd personal-website
And next button doesn`t work

3 Likes

I think this is a bug. The solution - get Help button in the lower right corner of the browser

Isn’t the correct order of the commands,

  1. cd personal-website

  2. git init

?

1 Like

In my own command line, when i write “git init” i get ‘git’ is not recognized as an internal or external command, operable program or batch file.
How do i initialize the git file?

1 Like

Yes git init is not working after using mkdir personal-website and then cd personal-website/ and then git init still not working

Refresh the website. Issue will disappear. :wink:

3 Likes

Yeah this dude Bekroz is correct

2 Likes

Oh, thanks. I’m glad that it helped you.^^

1 Like

For anyone who gets stuck on either steps like I have for the past 30 minutes. Use the following the ‘ls’ command to list all of the files in the current directory. You will see a file called ‘workspace’. Use ‘cd workspace’ to navigate to it. Repeat this process for the files ‘daw’ and ‘personal-website’. Once in the ‘personal-website’ directory, you should have passed the first step.

For the second step, use the ‘git init’ command and you will pass the second step.

1 Like

Go to “cd /home/ccuser/workspace/daw” (not “cd /home/ccuser/personal-website”)!
then create a personal-website HERE (in the daw folder), then cd personal-website, and finally use “get init”

REPEAT AGAIN: when you arrive “ccuser” and use “ls” to see all the folders in there and there will be a personal-website, DOES NOT enter the “personal-website” and use “git init”!. You must enter “workspace/daw” and create “personal-website” (code: mkdir personal-website), enter it and “git init”

1 Like

IT DOEEEEEESSSSNT WORK!!!

can anyone try to explain why it doesn’t work… do I need to create some folder on my local computer or is it completely connected through the browser… a poor explanation from code academy I see all the TIME!

Hey, @patrickribbsaeter welcome to the forums.

Can we have a link to your repository and a picture of the settings for your Github pages?

2 Likes