Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

Help with hosting a project with github

Hello,

I am trying to follow through the steps to host a project on GitHub but can not get it to work. I have followed the courses step for a page and am only getting this:

https://github.com/pammitchell/SoundLearning

My first attempt was this, https://github.com/pammitchell/pammitchell

but no site is showing in either and no code appearing in the first one. If you have any idea on what I am doing wrong your help is appreciated. Thank you.

changed category to development tools

2 Answers

Hi Tracy,

There are a couple of different ways to publish sites using GitHub Pages.

  1. If you create a repository with the special name 'pammitchell.github.io', the master branch of that repo will be served up at http://pammitchell.github.io
  2. If you want to create a site for an additional project, there are two ways to do so. You could build out your site within a /docs directory in your master branch, Alternatively, you can create a branch within that project called gh-pages to serve pages from the directory root. In either case, your project (e.g. SoundLearning) site will be available at http://pammitchell.github.io/SoundLearning.

Hope that helps. Good luck!

Ty

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

Thank you Ty,

I think I have mucked it up trying to learn how to use this. I deleted the repositories from the GitHib account to try again along with the treehouse workshop video, but the console seems to think the gh-pages still exists. Any advice on how to start again with the project upload?

Kevin Korte
Kevin Korte
28,149 Points

With the URL you are going for, you haven't created the gh-pages branch that Ty mentioned. You would commit your site to that branch, not the master branch.

If you really need to start over, make sure you also delete the hidden .git folder in your project, as github isn't the master git repository, git on your local machine is. So deleting the repo from github does not clear the history from git on your console.

Tracy Excell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Points

Hello,

I went through and deleted everything I thought I needed to and this is what I am getting in the console? Any idea what it means and how I can fix it?

Thank you

PS C:\Users\tracyandgrant> git config push.default tracking PS C:\Users\tracyandgrant> cd Desktop PS C:\Users\tracyandgrant\Desktop> cd SoundLearning PS C:\Users\tracyandgrant\Desktop\SoundLearning> git init Reinitialized existing Git repository in C:/Users/tracyandgrant/Desktop/SoundLearning/.git/ PS C:\Users\tracyandgrant\Desktop\SoundLearning> git status On branch gh-pages nothing to commit, working tree clean PS C:\Users\tracyandgrant\Desktop\SoundLearning> git add . PS C:\Users\tracyandgrant\Desktop\SoundLearning> git status On branch gh-pages nothing to commit, working tree clean PS C:\Users\tracyandgrant\Desktop\SoundLearning> git commit -m 'second commit' On branch gh-pages nothing to commit, working tree clean PS C:\Users\tracyandgrant\Desktop\SoundLearning> git remote add origin https://github.com/pammitchell/Soun

git push -u origin master fatal: remote origin already exists. remote: Repository not found. fatal: repository 'https://github.com/pammitchell/pammitchell.git/' not found PS C:\Users\tracyandgrant\Desktop\SoundLearning> git push -u origin master remote: Repository not found. fatal: repository 'https://github.com/pammitchell/pammitchell.git/' not found PS C:\Users\tracyandgrant\Desktop\SoundLearning>