-
Notifications
You must be signed in to change notification settings - Fork 40
How to fork the boilerplate and sync the fork with the original repository
Aldo edited this page Mar 14, 2018
·
3 revisions
This guide is based on:
https://help.github.com/articles/syncing-a-fork
and
https://help.github.com/articles/configuring-a-remote-for-a-fork.
-
Go to the RESCORM repository https://github.com/agordillo/RESCORM, and fork it with your GitHub user using the web interface.
-
Open a terminal and clone the fork in your working directory.
git clone [email protected]:username/RESCORM.git
- Enter in the fork and add a remote pointing to the original RESCORM repository.
cd RESCORM/
git remote add upstream https://github.com/agordillo/RESCORM.git
From now on, the following commands can be executed in order to bring the changes from the official repository to your repository:
- Fetch changes from agordillo/RESCORM:
git fetch upstream
From https://github.com/agordillo/RESCORM
[new branch] master -> upstream/master
[new branch] otherBranch -> upstream/otherBranch
Now, you have all the updates in upstream/#{branchName}.
The stable version is in upstream/master.
- Go to your local master branch (if you are not)
git checkout master
- Finally, merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
git merge upstream/master