How to upload content to project page on Github
This is the process of sucessfully uploading my first project to Github page after reading 10+ different versions of tutorials. http://evangeline97.github.io/domes-zne/
If you have developed a webpage on local computer and want to use the free domain/service of Github to host it, follow the steps:
- Create repo on github website
To put your project up on GitHub, you'll need a repository for it to live in. Let's create one! On GitHub, you can…help.github.com
2. Open terminal
- // Retrieve a copy of your GitHub repo.
- git clone https://github.com/user/repository.git
// Move into that directory.
- git rm -rf . # Remove all files from the old working tree
- git checkout — orphan gh-pages
If you already had files in the master branch of your GitHub repo you now need to delete these from the new gh-pages branch. To do this you can use the following command:
- git rm -rf .
3. In your computer folder, move the content for uploading into the repo folder
4. On terminal
- git add . #add files to repo
- git commit -a -m “Adding pages” #create commit to server
- git push origin gh-pages #update server
- Non fast forward errors https://help.github.com/articles/dealing-with-non-fast-forward-errors/
- Untracked files error after commit line http://stackoverflow.com/questions/8470547/git-commit-a-untracked-files