Remotes and Cloning
Understand a remote
A remote is a bookmark to another copy of the repository, usually on GitHub. The common default name is origin.
Clone an existing project
Cloning downloads commits and sets origin for you. Change into the new folder afterward.
git clone https://github.com/example/notes.git
cd notes
git remote -v
Add a remote to a local repo
If you started with git init, create an empty repository on GitHub, then point origin at its URL.
git remote add origin https://github.com/yourname/notes.git
git remote -v
Prefer HTTPS or SSH deliberately
HTTPS works with a credential helper or personal access token. SSH uses keys configured in your GitHub account. Either is fine for beginners once authentication works.
Comments
One comment per signed-in account. Comments are saved with this page’s URL.