OK, so I basically answered my own question by reading the documentation on Github. Go figure, reading documentation and actually learning something.
Apparently I had to create a new remote, pointing to EllisLab’s CodeIgniter repository:
git remote add upstream https://github.com/EllisLab/CodeIgniter.git
Then I fetch the upstream changes:
git fetch upstream
Then I merge the CodeIgniter develop branch with my own:
git merge upstream/develop
I need to learn how to manage conflicts and stuff, but I guess I can practice over time and figure that out.
This is the one of 2 ways to do it, but it’s both the hard and the improper one. You should do this instead (no remotes needed):
git pull email@example.com:<user/organization>/<repository>.git <branch>
git pull firstname.lastname@example.org:EllisLab/CodeIgniter.git develop
Using remotes is fine and is good for comparing changes between your fork and the upstream repository:
git diff upstream/develop # will show you differences between your current working tree and the upstream repository
git diff origin/develop # will show you difference between your current working tree and your online fork
... but it also requires you to regularly (and manually) fetch updates via e.g. git fetch upstream AND you’re actually merging changes as if they are from another branch instead of only pulling the most recent commits.
Otherwise it’s good practice to keep the master, develop and any branches existing in the upstream repo clean and create a new branch for anything that would be modified by you. And this is essential if you’ll be submitting a pull request.