Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Carlos Enrique Castañeda Gutiérrez13,886 Points
Why CNAME was commited on Master Branch?
I'm assuming the web on the video is a "project website" not "user website". I was wondering why the CNAME was commited to the Master branch when the "live" branch is "gh-pages". It shoudn't make more sense to commited on gh-pages because how the domain provider read the CNAME if this file is in a non-live branch (Master)?
Tom Hughes10,174 Points
I know this is a little old but in this video it is a user website, not a project website.
You can see at 2:45 the repository name of guilh.github.io
Dear Carlos Enrique Castañeda Gutiérrez,
You're assuming right. And Tom Hughes, has answered it already. In fact, I wondered about it for a while too. But then, I realized that this time the instructor, Guil, was not using GitHub pages for a repo, rather a user website. And earlier in the course, he said that "user websites" don't need to be on a gh pages branch. They are meant to be in their "master" branch. That's why the CNAME was committed to the master branch. When you'll be working on a project site, you'll be committing to the gh-pages. Hope that clears the matter up a bit more. Happy Coding
You don't have to commit on your gh-pages branch even for your project pages. It is merely a convention that was followed in the video to prevent all changes to the master going live.
On github repo, if you go to settings menu option, you will see section for git hub pages. you can select your master branch there if you want to and no need to even create any branches. I have done the same as well.