Create New Github Repository

Here you create a new Github repository and a matching local Git repository.

Github repository screen

Install Git

sudo apt install git

Configure Git

git config --global user.name "Your Name"
git config --global user.email your.email@example.com
git config --global push.default simple

Create New Github Repository

Create a new empty repository on Github. In this example it is named repo-name.

Create New Local Directory

If the directory does not yet exist locally, then create it now:

mkdir ~/repo-name

Change into the local directory:

cd ~/repo-name

Add README

Start a README in markdown format:

touch README.md
echo "# repo-name" > README.md

Commit Local Changes

git init
git add .
git commit -m "Initial commit"

Push Local to Github

git remote add origin https://github.com/user-name/repo-name.git
git push -u origin master

Add LICENSE

On Github, add to the repository a new file named LICENSE. Select the license type you want to add. This method create a Pull Request, which you must then accept and merge into your repository.

Pull LICENSE

Pull the revised repository, with its license, down to your VPS:

git pull