Skip to content

Latest commit

 

History

History
58 lines (48 loc) · 1.49 KB

pull-changes-from-mate-repo-guideline.md

File metadata and controls

58 lines (48 loc) · 1.49 KB

How to pull changes from the Mate academy repository guideline

Problem:

Sometimes mentors add changes to GitHub task when you already forked it and downloaded to your local machine.

Solution:

To get changes from Mate academy repository you have to add connection between this repository and your local machine and pull changes. Follow the instructions below.

  1. Open a terminal and type the command to see your remote connections:
git remote -v

you should see one connection to your forked repository:

Remote list before

  1. Go to origin Mate academy repository and copy a link to it:

Link to Mate academy repository

  1. Add another remote named 'upstream'. Pass link to Mate academy repository you've recently copied:
git remote add upstream <copied_url>
  1. Check that new remote was added:
git remote -v

you should see two connections now:

Remote list after

  1. Switch to master branch:
git checkout master
  1. Pull changes from Mate academy repository:
git pull upstream master
  1. Switch to your branch:
git checkout develop

Note: if you created another branch (not develop) use its name instead

  1. Rebase commits from your branch:
git rebase master
  1. Push changes to GitHub:
git push origin develop -f

Now you can continue working on the task.