Skip to content
Yash Srivastav edited this page May 26, 2016 · 2 revisions

All of you have forked this project and are working on your own copies. To update your fork to the latest version, you need to do some steps. I am assuming you have cloned your fork to a folder on your laptop.

From inside that folder, If you execute git push origin BRANCH_NAME then the particular branch on your own repository is updated. Similarly if you do git pull origin BRANCH_NAME then your the branch on your copy of this project is downloaded not the branch of this project. Therefore, origin refers to the source yourusername/Smart-Mirror not the main source present at 11000011/Smart-Mirror

Now, how will you update your copy, i.e. github.com/yourusername/Smart-Mirror to the original github.com/11000011/Smart-Mirror???

To do that, you will need to add another source to your offline repo. I prefer to call this source upstream, but you may name it whatever you want.

From inside the folder which has the git clone of yourusername/SmartMirror, run:

git remote add upstream https://github.com/11000011/Smart-Mirror.git

Now that this is added, checkout to your local copy's master branch:

git checkout master

Now you are viewing a copy of yourusername/Smart-Mirror. Execute:

git pull upstream master

This downloads upstream changes to your local copy of origin. Now to update origin,

git push origin master

And now your origin is updated.

Clone this wiki locally