Github is a web-based repository hosting service. You can use it to host source code plus documentation, wikis, issue tracking & more. Public (ie open) projects are free.

You can also use Github pages to host static websites directly from your Github repository.

Github hosts Git repositories - these are a way of versioning / tracking changes to a set of files.

Git basics

This is just for background information, you might want to skip straight to Github pages.

Create

To create a new local repository simply create a new directory and type git init eg

cd code
mkdir helloworld
cd helloworld
git init

Clone

To grab a copy of a remote repository use git clone <url> eg

cd code
git clone https://github.com/username/somerepository
cd somerepository

Commit

To tell Git which files to version, first add them to the repository using git add <filename>.
Then you need to commit these staged files using git commit and providing a brief commit message explaining whats changed.
And finally you can push these to a remote repository with git push eg

cd code
cd somerepository
git add file1.txt file2.txt
git commit -m 'Initial commit, adding new files'
git push

Diagram of git stages