Symlink error when attempting to deploy website


I've got to the last part of the Deploy a Website course.
However, after executing the git push command, I could not find my new website.
I received an email from Github with the message:
"The page build failed with the following error:

A file was included in my-portfolio-site/ that is a symlink or does not exist in your _includes directory. For more information, see "

Looking inside the file doesn't help me, as all it contains is:

layout: page
title: About
permalink: /about/

I believe that I have the filenames following the github conventions.
I expected my website to appear at

Can anyone help?


You created the repository in the wrong location, it should be in my-portfolio-site

So you need to go to the directory of your local repository and run something along the lines of:

$ mv my-portfolio-site/* .
$ rm my-portfolio-site
$ git add *
$ git commit -m 'fix directory structure'
$ git push

If there are any errors while doing that you'll just have to read them and act accordingly.

Alternatively, remove the .git and create the repository anew


Thanks - I'll try that now.


Oh and codecademy might expect your local files to be of this structure:

└── daw
    └── my-personal-website
        ├── .git/
        ├── _config.yml
        ├── css/
        ├── feed.xml
        ├── _includes/
        ├── index.html
        ├── _layouts/
        ├── _posts/
        ├── _sass/
        └── _site/

It might not look at your files any more though, and thus not care


:relaxed: Thank you. I followed your instructions, and it's all working fine - my portfolio site is indeed online.
Yes, on my first, unsuccessful, attempt I was in the folder above my-portfolio-site when I did the Git init, add, commit and push. Had I followed the Codecademy instructions carefully, this would not have happened.
Your recommended commands worked, except that "rm my-portfolio-site" needed to have the -r flag i.e. "rm -r my-portfolio-site", and I used the version of the "push" command from Step 6 in the lesson i.e. "git push -u origin master".


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.