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.
Craig Curtis19,985 Points
I didn't use an "index.html" file. How do I push this update to git?
So I forgot to name the main file as index.html. So after pushing (and pulling out hair), tried the steps from the beginning, but the new index.html file on Github was not pushed.
So how do I update these changes from the terminal?
I tried <code>git push origin gh-pages</code> but I got the error: <blockquote> Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. </blockquote>
Robert Darby9,359 Points
Checkout the branch you want to push it to (probably master)
git checkout master
Pull down current copy of master on remote
Rename your main file to index.html then add all your changed files to staging
git add -A
Push your changes to remote
This is worth a watch: