Calculator Project – Going Online

You can get my code! The quickest way to do it is to fork my project. Search in for hebrews110/calculator, and click on fork in the right corner. It will automatically create a repository in your Github account that duplicates my project. You can then download my code onto your computer. On the main repository page there is a download button.

You can also get your project online. Open Git Bash and use cd, change directory to navigate to the folder, the directory where you have your project. Type git init to create a git directory. Type git add . to tell it you want to add everything into the online repository. Type git commit -m “Message here – such as Create calculator page.”

Then you need a place for it to go. In your Github account online click on the plus sign or New Repository. Type in a name, maybe calculator. Create the repository.

Then you are going to type the push code it gives you.

git add origin…..

git push -u origin master

Click the Settings tab and scroll down to Github Pages. Change the Source from None to Master Branch. The page will reload. Scroll back down to Github Pages and it will show you the link to your page.

It will take a few minutes for your page to be available online. If it’s still not there ten minutes later, then something is probably wrong. Make sure that you have an index.html page. That’s what it is looking for. If you called your html file calculator.html, it won’t be able to find it. Rename the file index.html, git add, commit, and push again, and it should work.

You can view this lesson.