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/elgg18/. 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.8:

cd ~/htdocs/elgg18
git checkout 1.8
git pull origin 1.8

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

git checkout -b 1234-18-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!)

Make your commit messages short and leading with Fixes # and the ticket number you're trying to close:

git commit -m "Fixes #1234: Button now works on group settings"

Push your work branch to your Elgg fork:

git push -u fork 1234-18-groupsettings

Browse to your fork on github and you'll see a button to create the pull request for that branch. For 1.8 fixes, make sure to base your fork's pull request against Elgg/1.8, 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.