Git & GitHub Course
Git & GitHub
/
Beginner

Local vs Remote Repository

Definition

A Local repository resides on your computer. A Remote repository is a version of your project that is hosted on the internet or network somewhere.

Explain Like I'm New

Local = Your laptop's hard drive. Remote = A server in the cloud (like GitHub). You do all your dirty work Locally. When the work is perfect and ready to be shared, you push it to the Remote.

Real World Example

Writing an essay on your laptop offline (Local), and then uploading it to Google Drive (Remote) so your teacher can read it.

Common Use Cases

  • •Team Collaboration
  • •Cloud Backups

Architecture & Flow

Interactive Example

Loading...
Console output will appear here...

Interview Questions

basic

  • Can a Local repository exist without a Remote repository?

intermediate

  • Can a Local repository be connected to MULTIPLE Remote repositories?

Flash Cards

Question

Exist without remote?

Click to reveal answer
Answer

Yes! You can run `git init` and use Git entirely on your own laptop forever, without ever touching the internet.

Question

Multiple remotes?

Click to reveal answer
Answer

Yes! You can have one remote pointing to GitHub (named 'origin') and another pointing to Heroku for deployments (named 'heroku').