Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Forking This Repository

Matt Greene edited this page Jun 10, 2013 · 3 revisions

The steps below outline the process for maintaining a fork of the official repository (base repo) on your personal GitHub account for the purpose of testing and merging updates.

1) Click Fork.

2) Choose your personal GitHub account

Follow the steps outlined in the Data Update Process for Mac OSX or for Windows to
3) Clone the forked repo to your computer
4) Update the data

To test online we must create or merge a copy of the site on branch named gh-pages Only do this after updating the site on the master (default) branch. There will be changes on the gh-pages branch that we do not want to merge back into the base repo.

1) On the Branches tab, click the plus button at the upper right of the master branch pane.

2) Enter gh-pages for the branch name and click Branch.

3) The new branch is automatically selected.

There are two important changes we must now make in order to make the site work properly from this location

4) Delete the CNAME file located in the root of the project.

5) Open the _config.yml file in your favorite text editor and update the baseurl: line (which should currently be blank) to read baseurl: /undp.github.com.

6) Commit these changes then push Publish Branch.

We have now commited the gh-pages branch to GitHub. This branch is a special branch that will serve files located within it on the web. The site will be located at http://YOURUSERNAME.github.io/undp.github.com/. This may take up to 10 minutes to become live.

##Merging into the official repo

Once satisfied that the update was successful, we will merge it into the base repository.

1) Click the Pull Request button.

2) The base repo should be undp/undp.github.com and the head repo should be YOURUSERNAME/undp.github.com. Both branches should be set to master.

3) Once satisfied with your message and/or comment, select Send Pull Request.
4) If you have access to the Base Repo, you should immediately see an option to Merge Pull Request. If not you must wait until someone with access accepts the request. Click the button, then the Confirm Merge button. The official repo is now up-to-date.

##Updating your gh-pages branch

You can use the same procedure to merge into your gh-pages branch with future updates made to your fork's master branch. Alternatively, you can use the GitHub app to do this.

1) Click the Merge View button to show the merge panel.
2) Drag your master branch into the left slot, and your gh-pages branch into the right.
3) Click Merge Branches.

Clone this wiki locally