Local vs Remote

Understand the difference between local and remote repositories and how push and pull connect them in the Git workflow.

Local vs Remote repositories

Local Repository
Remote Repository

Lives on your computer

Lives on a server (e.g. GitHub)

Stores commits and branches

Stores shared project history

Works offline

Requires internet

Used for personal development

Used for collaboration and backup

Local and remote repositories represent two copies of the same project.

  • You work and commit changes locally.

  • You synchronize those changes with the remote repository when needed.

circle-exclamation

Push and Pull

Push
Pull

Local → Remote

Remote → Local

Shares your work

Gets others’ work

Requires commits

Updates your local project

Used after committing

Used before starting work

circle-info

Commit locally, pull before work, push after work.

Basic examples

circle-exclamation
Diagram explain the deference between remote and local in GitHub with push and pull command - ITC

For deeper details:

Pushing changes →arrow-up-right

Pulling changes →arrow-up-right

Last updated

Was this helpful?