Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials Git Working with Remotes
Git Beginner FREE

Working with Remotes

Lesson 1 of 17 Beginner Interactive

Remote repositories are versions of your project hosted on a server (GitHub, GitLab).

Syntax

GIT
git remote add origin URL
git push -u origin main
git pull origin main
git fetch origin
Working with Remotes
BASH
# Add remote
git remote add origin https://github.com/user/repo.git

# Push to remote
git push origin main

# Pull from remote
git pull origin main

# Fetch changes
git fetch origin

# View remotes
git remote -v

Practice

1
Exercise

Practice this concept.

Answer
Run the commands as shown above.

Quick Quiz

1

What did you learn?

This covers the basics.

Interview Questions

It is a fundamental Git feature.