How do I use Github

Last updated by Paweł Sroka

I have separate branches for every feature. This way I can work on particular feature without interference from other work I do in parallel (we often add more commits to PRs over time).

I have only two Elgg installs on my dev machine, for 1.8 branch and for 1.9. If I had do develop sth for older version of Elgg, I'd have to make third install - but I never had to do such trick so far. Only motivation is to have proper data in database - two installs for main branches are enough. Than I just switch between feature branches for particular big-dot-version.

I work on windows and use Tortoise GIT. I like it's log browser with nice commits tree display.

If you do sth terribly wrong you can always "force" changes back. This is operation that can cause permanent data loss, so you should avoid using it. Bad PRs just get closed, than you can do another one. Of course you can delete branches. I keep mine, because it's not a problem for me and deleting them would take some time. Organization of your repo and naming conventions are only yours concern. Just don't commit anything to master or 1.8 branches directly. This way you can do "fast forward" rebase of the branch and avoid merges and deviating commit tree from upstream. It's pretty painful for beginning to mess up main branches, you need to do reabasing and "hard resets" - try to aviod it until you get more familiar with git.

Git is pretty elastic when it comes to manipulating commits. You can squash multiple commits into one, or rebase particular tree onto another. That's one of the gratest powers of git.

Paweł Sroka

Former Core Elgg team member, freelance developer.