GitHub
On this page Contents

Git

Connect a local project to an existing GitHub repo with SSH

The straight path for connecting a local project to an already created GitHub repository over SSH.

Use this when the GitHub repo already exists and the local project needs to connect to it with SSH.

Check current remotes #

PowerShell
git remote -v

Add the existing GitHub repo as origin #

PowerShell
git remote add origin git@github.com:YOUR-USERNAME/personal-hugo-docs.git

Rename branch to main #

PowerShell
git branch -M main

First push upstream #

PowerShell
git push -u origin main

Search docs

Use / or CtrlK to search

Start typing to search the docs.