</>
Skip to content
Git lessons (28/44)

Git — Remote

View Remotes

git remote -v

Add Remote

git remote add origin https://github.com/user/repo.git

Remove Remote

git remote remove origin

Rename Remote

git remote rename origin upstream

Change URL

git remote set-url origin https://github.com/user/new-repo.git

Fetch Remote

git fetch origin

Push to Remote

git push origin main

Pull from Remote

git pull origin main

Remote Branches

# List remote branches
git branch -r

# Track remote branch
git checkout -b local-branch origin/branch

Mini Practice

  1. View remotes
  2. Add a remote
  3. Change remote URL
  4. Fetch and push

Up Next

Continue with Remote Repository — remote repos in depth.

Related Topics

Frequently Asked Questions about Remote

What is Remote in Git?

Remote is a fundamental concept in Git. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn Remote?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Remote.

Why is Remote important in Git?

Remote is essential for Git development. Understanding this concept will help you write better code and solve real-world problems more effectively.