FAQ: Deploy Your Website to GitHub Pages - Commit Your Changes

This community-built FAQ covers the “Commit Your Changes” 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 Commit Your Changes

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!

I’m getting this error:

fatal: Not a git repository (or any of the parent directories): .git

What message should I put in to make it work?


I am having the same problem

You should verify you are in the right directory (pwd), then verify a git repository exists:

ls -l

you should see a .git directory. If the git directory does not exists, you should create a new git repository (git init)

When typing- git commit -m “Save my work”, -" nothing to commit, working directory clean " pooped up what should i do here ? Actually um facing challenge at " 1. Commit (save) your changes" step.

have you added files to the staging area using git add? You can do: git status to see which files you changed, and which files you added to staging area

Hi cant over come step 2 here, see the picture this is my current situation.

looks fine to me. Hm… you could maybe use git reset and try again? no error

see now its showing this

you have to reset to a commit, so you would need to log the commits:

git log

then soft or hard reset the commit:

git reset --soft commithash

where the commit hash you should get from git log

I’m seriously getting mad with it! Someone can help me please? I’m all day long trying to solve this lesson :exploding_head:

Seriously, something is gone wrong with it. I’m not getting it! Can someone help me please?? :sob:

you are within the .git directory, why? Why would you want commit those files?

I don’t know! :scream: I just tried every possibilities.
If i get start with git add . and then i use git commit -m “Save my work” it doesn’t work! i don’t get in which point i should use it

you are working on a project in daw directory. In this project you have a git repository, which created the .git directory. GIt uses this directory to keep track of changes. You rarely need to go into/inside the .git directory

you want to add and commit the files in the daw directory.

not understanding what you are trying to do/accomplish and just brute forcing is rarely idea. You might get lucky at some point, but by this time you had so much frustration, not worth it

1 Like

Yeah you are right! I gotta keep calm and put my frustration away :sweat: ahahah Now I try one last time, and I will do it :love_you_gesture:t3:
I mean, I hope!! Thank your for the support

And its also important to understand what you are doing, and why.

I have a problem with quotation marks. As what you can see from the picture the quotation marks I am able to write are bigger and with wider gap. Any idea how to change settings?

there are two types: quotation marks (") and apostrophe ('), you seem to use apostrophe, which is also fine:

git commit -m 'save my work'


I have used the git commit -m “Save my work” but the check box hasn’t highlighted wrong (red) or correct (green). Kindly check my snippet of the code and advise.