1. Elgg bug fixing with git

Last updated by Steve Clay

It's assumed you already have a working Elgg install at http://localhost/elgg112/. See the preparation guide if not.

Make sure there's an issue for the work you're about to do.

Pull the latest work from the Elgg repo. For Elgg 1.12:

cd ~/htdocs/elgg112
git checkout 1.12
git pull origin 1.12

Run Elgg's upgrade script just to make sure your caches are primed.

Create a branch to work on.

There are no hard rules on naming branches, but I like: issue#_description. E.g. to fix a problem on the group settings page, I'd name the branch "1234_groupsettings", which immediately gives me a good idea of what that branch contains. To create it:

git checkout -b 1234_groupsettings

Now on your own branch, you're free to make any changes you need and commit them (after thoroughly testing your changes, including running Elgg's unit test suite, of course!)

Before you commit your code, check the Commit Message Guidelines, and the rest of the coding guidelines. I like to use GitX for tight control over what code I commit.

After committing, push your work branch to your Elgg fork:

git push -u fork 1234_groupsettings

Browse to your fork on github and you'll see a button to create the pull request for that branch. For 1.12 fixes, make sure to base your fork's pull request against Elgg/1.12, not Elgg/master.

I suggest naming your pull request similarly as your commit (include the issue #).

Congrats! You've now offered your changes for reviewing by the core team.