Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Latest commit

 

History

History
18 lines (18 loc) · 1.49 KB

Configuring Remotes.md

File metadata and controls

18 lines (18 loc) · 1.49 KB

Configure Remotes

When a repository is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named upstream:

  1. Get the path where you have your git repository on your machine. Go to that path in Terminal using cd. Alternatively, right click on project in Github Desktop and hit ‘Open in Terminal’.
  2. Run git remote -v to check the status you should see something like the following:

origin https://github.com/YOUR_USERNAME/mentorship-ios.git (fetch)
origin https://github.com/YOUR_USERNAME/mentorship-ios.git (push)

  1. Set the upstream:
    git remote add upstream https://github.com/anitab-org/mentorship-ios.git
  2. Run git remote -v again to check the status, you should see something like the following:

origin https://github.com/YOUR_USERNAME/mentorship-ios.git (fetch)
origin https://github.com/YOUR_USERNAME/mentorship-ios.git (push)
upstream https://github.com/anitab-org/mentorship-ios.git (fetch)
upstream https://github.com/anitab-org/mentorship-ios.git (push)

  1. To update your local copy with remote changes, run the following:
    git fetch upstream develop
    git rebase upstream/develop
    This will give you an exact copy of the current remote, make sure you don't have any local changes.
  2. Project set-up is complete.