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

General Discussion

Christopher Mlalazi
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

Publishing on someone else's github page

I have this idea. I have developed a website for someone, and now I want them to open a Github account so that I can publish it in their github pages. If I do that in my Github pages the domain name will also have my name like this (https://chrismlalazi.github.io/Thakor-Patel/index.html), and I don't want that. I want it to only reflect this persons name like this (https:/thakorpatel.github.io/index.html). The person does not know how to use github and the console so they can't load the website even if I gave them the website folder, and they live across the oceans from me. Is it possible to use the Github app on my desktop to load a website into another persons Github pages via their Github account. Hopefully I explained myself clearly.

2 Answers

Harry James
Harry James
14,780 Points

Hey Christopher!

Excuse me forking your project there whilst I tried things out! I've managed to get this working in a way that does not involve the command line whatsoever, so tell your client to follow these instructions to get the site running in their name.

1) Set up a GitHub account in the username you want to base your website off: yourusername.github.io/Thakor-Patel will be the domain of the site. 2) Go to my project here and click on the Fork button in the top-right. 3) You should then be shown a forked version of the project. To make sure you're looking in the right place, it should say underneath "forked from ChrisMlalazi/Thakor-Patel", like follows:

4) Go to the Settings tab here, and hit Branches on the left sidebar. 5) Set the Default branch to gh-pages in the dropdown provided and press Update. 6) Head back to the Code tab. 7) Change the branch here to gh-pages as well from the dropdown located here:

8) Now, click Create new file to the right of this dropdown and fill in the details below:

So in words, that's set the page name to update_page.html, enter Hello world as the text (Or anything, it does not matter) and for the commit, set the name to Update page, leave the description blank, ensure you are committing to gh-pages then, press Commit new file.

Within a couple of minutes, your page should be active, and you can check it out at yourusername.github.io/Thakor-Patel.

Edit: Oh, one last tip - If you want to get rid of the /Thakor-Patel, you can go to Settings and rename the repository to yourname.github.io :)

Although there's still quite a few steps, this is the easiest way to go about it without using commands, so hopefully this should help :)