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 Creating a Project Pages Site

Craig Curtis
Craig Curtis
19,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>

1 Answer

Checkout the branch you want to push it to (probably master)

git checkout master

Pull down current copy of master on remote

git pull 

Rename your main file to index.html then add all your changed files to staging

git add -A

Push your changes to remote

git push

This is worth a watch:

https://teamtreehouse.com/library/git-basics