1. Elgg bug fixing with git: Revision

Last updated by Steve Clay

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

Make sure there's a Trac ticket for the work you're about to do.

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

cd ~/htdocs/elgg111
git checkout 1.11
git pull origin 1.11

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: briefdescription-ticket#. E.g. to fix a problem on the group settings page, I'd name the branch "groupsettings-1234", which immediately gives me a good idea of what that branch contains. To create it:

git checkout -b groupsettings-1234

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 groupsettings-1234

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

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

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

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.