How to rename a GitHub repository in Git

Step by step guide to rename a GitHub repository and update local clones and remotes so pushes and pulls keep working.